Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 2b0143b5 authored by David Howells's avatar David Howells Committed by Al Viro
Browse files

VFS: normal filesystems (and lustre): d_inode() annotations



that's the bulk of filesystem drivers dealing with inodes of their own

Signed-off-by: default avatarDavid Howells <dhowells@redhat.com>
Signed-off-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
parent ce0b16dd
Loading
Loading
Loading
Loading
+7 −7
Original line number Diff line number Diff line
@@ -153,7 +153,7 @@ static int ll_ddelete(const struct dentry *de)

	CDEBUG(D_DENTRY, "%s dentry %pd (%p, parent %p, inode %p) %s%s\n",
	       d_lustre_invalid((struct dentry *)de) ? "deleting" : "keeping",
	       de, de, de->d_parent, de->d_inode,
	       de, de, de->d_parent, d_inode(de),
	       d_unhashed(de) ? "" : "hashed,",
	       list_empty(&de->d_subdirs) ? "" : "subdirs");

@@ -167,8 +167,8 @@ static int ll_ddelete(const struct dentry *de)
#if 0
	/* if not ldlm lock for this inode, set i_nlink to 0 so that
	 * this inode can be recycled later b=20433 */
	if (de->d_inode && !find_cbdata(de->d_inode))
		clear_nlink(de->d_inode);
	if (d_really_is_positive(de) && !find_cbdata(d_inode(de)))
		clear_nlink(d_inode(de));
#endif

	if (d_lustre_invalid((struct dentry *)de))
@@ -181,7 +181,7 @@ int ll_d_init(struct dentry *de)
	LASSERT(de != NULL);

	CDEBUG(D_DENTRY, "ldd on dentry %pd (%p) parent %p inode %p refc %d\n",
		de, de, de->d_parent, de->d_inode,
		de, de, de->d_parent, d_inode(de),
		d_count(de));

	if (de->d_fsdata == NULL) {
@@ -261,7 +261,7 @@ void ll_invalidate_aliases(struct inode *inode)
	ll_d_hlist_for_each_entry(dentry, p, &inode->i_dentry, d_u.d_alias) {
		CDEBUG(D_DENTRY, "dentry in drop %pd (%p) parent %p inode %p flags %d\n",
		       dentry, dentry, dentry->d_parent,
		       dentry->d_inode, dentry->d_flags);
		       d_inode(dentry), dentry->d_flags);

		d_lustre_invalidate(dentry, 0);
	}
@@ -309,7 +309,7 @@ void ll_lookup_finish_locks(struct lookup_intent *it, struct inode *inode)
static int ll_revalidate_dentry(struct dentry *dentry,
				unsigned int lookup_flags)
{
	struct inode *dir = dentry->d_parent->d_inode;
	struct inode *dir = d_inode(dentry->d_parent);

	/*
	 * if open&create is set, talk to MDS to make sure file is created if
@@ -329,7 +329,7 @@ static int ll_revalidate_dentry(struct dentry *dentry,
	if (lookup_flags & LOOKUP_RCU)
		return -ECHILD;

	do_statahead_enter(dir, &dentry, dentry->d_inode == NULL);
	do_statahead_enter(dir, &dentry, d_inode(dentry) == NULL);
	ll_statahead_mark(dir, dentry);
	return 1;
}
+8 −8
Original line number Diff line number Diff line
@@ -387,7 +387,7 @@ int ll_file_release(struct inode *inode, struct file *file)
static int ll_intent_file_open(struct dentry *dentry, void *lmm,
			       int lmmsize, struct lookup_intent *itp)
{
	struct inode *inode = dentry->d_inode;
	struct inode *inode = d_inode(dentry);
	struct ll_sb_info *sbi = ll_i2sbi(inode);
	struct dentry *parent = dentry->d_parent;
	const char *name = dentry->d_name.name;
@@ -412,7 +412,7 @@ static int ll_intent_file_open(struct dentry *dentry, void *lmm,
			opc = LUSTRE_OPC_CREATE;
	}

	op_data  = ll_prep_md_op_data(NULL, parent->d_inode,
	op_data  = ll_prep_md_op_data(NULL, d_inode(parent),
				      inode, name, len,
				      O_RDWR, opc, NULL);
	if (IS_ERR(op_data))
@@ -2889,7 +2889,7 @@ static int ll_inode_revalidate_fini(struct inode *inode, int rc)

static int __ll_inode_revalidate(struct dentry *dentry, __u64 ibits)
{
	struct inode *inode = dentry->d_inode;
	struct inode *inode = d_inode(dentry);
	struct ptlrpc_request *req = NULL;
	struct obd_export *exp;
	int rc = 0;
@@ -2941,12 +2941,12 @@ static int __ll_inode_revalidate(struct dentry *dentry, __u64 ibits)
		   do_lookup() -> ll_revalidate_it(). We cannot use d_drop
		   here to preserve get_cwd functionality on 2.6.
		   Bug 10503 */
		if (!dentry->d_inode->i_nlink)
		if (!d_inode(dentry)->i_nlink)
			d_lustre_invalidate(dentry, 0);

		ll_lookup_finish_locks(&oit, inode);
	} else if (!ll_have_md_lock(dentry->d_inode, &ibits, LCK_MINMODE)) {
		struct ll_sb_info *sbi = ll_i2sbi(dentry->d_inode);
	} else if (!ll_have_md_lock(d_inode(dentry), &ibits, LCK_MINMODE)) {
		struct ll_sb_info *sbi = ll_i2sbi(d_inode(dentry));
		u64 valid = OBD_MD_FLGETATTR;
		struct md_op_data *op_data;
		int ealen = 0;
@@ -2984,7 +2984,7 @@ static int __ll_inode_revalidate(struct dentry *dentry, __u64 ibits)

static int ll_inode_revalidate(struct dentry *dentry, __u64 ibits)
{
	struct inode *inode = dentry->d_inode;
	struct inode *inode = d_inode(dentry);
	int rc;

	rc = __ll_inode_revalidate(dentry, ibits);
@@ -3012,7 +3012,7 @@ static int ll_inode_revalidate(struct dentry *dentry, __u64 ibits)

int ll_getattr(struct vfsmount *mnt, struct dentry *de, struct kstat *stat)
{
	struct inode *inode = de->d_inode;
	struct inode *inode = d_inode(de);
	struct ll_sb_info *sbi = ll_i2sbi(inode);
	struct ll_inode_info *lli = ll_i2info(inode);
	int res = 0;
+1 −1
Original line number Diff line number Diff line
@@ -1488,7 +1488,7 @@ static inline void d_lustre_invalidate(struct dentry *dentry, int nested)
{
	CDEBUG(D_DENTRY, "invalidate dentry %pd (%p) parent %p inode %p refc %d\n",
	       dentry, dentry,
	       dentry->d_parent, dentry->d_inode, d_count(dentry));
	       dentry->d_parent, d_inode(dentry), d_count(dentry));

	spin_lock_nested(&dentry->d_lock,
			 nested ? DENTRY_D_LOCK_NESTED : DENTRY_D_LOCK_NORMAL);
+3 −3
Original line number Diff line number Diff line
@@ -1169,7 +1169,7 @@ static int ll_md_setattr(struct dentry *dentry, struct md_op_data *op_data,
		  struct md_open_data **mod)
{
	struct lustre_md md;
	struct inode *inode = dentry->d_inode;
	struct inode *inode = d_inode(dentry);
	struct ll_sb_info *sbi = ll_i2sbi(inode);
	struct ptlrpc_request *request = NULL;
	int rc, ia_valid;
@@ -1293,7 +1293,7 @@ static int ll_setattr_ost(struct inode *inode, struct iattr *attr)
 */
int ll_setattr_raw(struct dentry *dentry, struct iattr *attr, bool hsm_import)
{
	struct inode *inode = dentry->d_inode;
	struct inode *inode = d_inode(dentry);
	struct ll_inode_info *lli = ll_i2info(inode);
	struct md_op_data *op_data = NULL;
	struct md_open_data *mod = NULL;
@@ -1467,7 +1467,7 @@ int ll_setattr_raw(struct dentry *dentry, struct iattr *attr, bool hsm_import)

int ll_setattr(struct dentry *de, struct iattr *attr)
{
	int mode = de->d_inode->i_mode;
	int mode = d_inode(de)->i_mode;

	if ((attr->ia_valid & (ATTR_CTIME|ATTR_SIZE|ATTR_MODE)) ==
			      (ATTR_CTIME|ATTR_SIZE|ATTR_MODE))
+3 −3
Original line number Diff line number Diff line
@@ -230,11 +230,11 @@ static int ll_nfs_get_name_filldir(struct dir_context *ctx, const char *name,
static int ll_get_name(struct dentry *dentry, char *name,
		       struct dentry *child)
{
	struct inode *dir = dentry->d_inode;
	struct inode *dir = d_inode(dentry);
	int rc;
	struct ll_getname_data lgd = {
		.lgd_name = name,
		.lgd_fid = ll_i2info(child->d_inode)->lli_fid,
		.lgd_fid = ll_i2info(d_inode(child))->lli_fid,
		.ctx.actor = ll_nfs_get_name_filldir,
	};

@@ -282,7 +282,7 @@ static struct dentry *ll_fh_to_parent(struct super_block *sb, struct fid *fid,
static struct dentry *ll_get_parent(struct dentry *dchild)
{
	struct ptlrpc_request *req = NULL;
	struct inode	  *dir = dchild->d_inode;
	struct inode	  *dir = d_inode(dchild);
	struct ll_sb_info     *sbi;
	struct dentry	 *result = NULL;
	struct mdt_body       *body;
Loading