]> git.karo-electronics.de Git - mv-sheeva.git/commitdiff
switch ocfs2, close races
authorAl Viro <viro@zeniv.linux.org.uk>
Sat, 18 Dec 2010 17:10:00 +0000 (12:10 -0500)
committerAl Viro <viro@zeniv.linux.org.uk>
Thu, 13 Jan 2011 01:02:46 +0000 (20:02 -0500)
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
fs/ocfs2/export.c
fs/ocfs2/namei.c
fs/ocfs2/super.c

index 6adafa5760654645d01132203f2db65765c22ce3..5dbc3062b4fd0757792c2f048d8a8a2c647b5b34 100644 (file)
@@ -137,9 +137,7 @@ check_gen:
        }
 
        result = d_obtain_alias(inode);
-       if (!IS_ERR(result))
-               d_set_d_op(result, &ocfs2_dentry_ops);
-       else
+       if (IS_ERR(result))
                mlog_errno(PTR_ERR(result));
 
 bail:
@@ -175,8 +173,6 @@ static struct dentry *ocfs2_get_parent(struct dentry *child)
        }
 
        parent = d_obtain_alias(ocfs2_iget(OCFS2_SB(dir->i_sb), blkno, 0, 0));
-       if (!IS_ERR(parent))
-               d_set_d_op(parent, &ocfs2_dentry_ops);
 
 bail_unlock:
        ocfs2_inode_unlock(dir, 0);
index 30c5231444527b4d592ed1c39e32645627ae6955..849fb4a2e814a9a640e90e410e435b2a3209d598 100644 (file)
@@ -147,7 +147,6 @@ static struct dentry *ocfs2_lookup(struct inode *dir, struct dentry *dentry,
        spin_unlock(&oi->ip_lock);
 
 bail_add:
-       d_set_d_op(dentry, &ocfs2_dentry_ops);
        ret = d_splice_alias(inode, dentry);
 
        if (inode) {
@@ -415,7 +414,6 @@ static int ocfs2_mknod(struct inode *dir,
                mlog_errno(status);
                goto leave;
        }
-       d_set_d_op(dentry, &ocfs2_dentry_ops);
 
        status = ocfs2_add_entry(handle, dentry, inode,
                                 OCFS2_I(inode)->ip_blkno, parent_fe_bh,
@@ -743,7 +741,6 @@ static int ocfs2_link(struct dentry *old_dentry,
        }
 
        ihold(inode);
-       d_set_d_op(dentry, &ocfs2_dentry_ops);
        d_instantiate(dentry, inode);
 
 out_commit:
@@ -1797,7 +1794,6 @@ static int ocfs2_symlink(struct inode *dir,
                mlog_errno(status);
                goto bail;
        }
-       d_set_d_op(dentry, &ocfs2_dentry_ops);
 
        status = ocfs2_add_entry(handle, dentry, inode,
                                 le64_to_cpu(fe->i_blkno), parent_fe_bh,
@@ -2462,7 +2458,6 @@ int ocfs2_mv_orphaned_inode_to_new(struct inode *dir,
                goto out_commit;
        }
 
-       d_set_d_op(dentry, &ocfs2_dentry_ops);
        d_instantiate(dentry, inode);
        status = 0;
 out_commit:
index 17ff46fa8a1037990e2ecdc4265a4346fffbc508..06d1f749ca8945264aded7f21c1c2b35285d52df 100644 (file)
@@ -2097,6 +2097,7 @@ static int ocfs2_initialize_super(struct super_block *sb,
 
        sb->s_fs_info = osb;
        sb->s_op = &ocfs2_sops;
+       sb->s_d_op = &ocfs2_dentry_ops;
        sb->s_export_op = &ocfs2_export_ops;
        sb->s_qcop = &ocfs2_quotactl_ops;
        sb->dq_op = &ocfs2_quota_operations;