diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2010-12-18 12:10:00 -0500 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2011-01-12 20:02:46 -0500 |
commit | ba87167c06ed0049260d9ca36405c0f8af609e07 (patch) | |
tree | df31ff885587f6ad0751b60ea067ce6d51d45c2f /fs/ocfs2 | |
parent | 41ced6dcf3dc6b901716fda0dc8de3536da4d39b (diff) |
switch ocfs2, close races
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs/ocfs2')
-rw-r--r-- | fs/ocfs2/export.c | 6 | ||||
-rw-r--r-- | fs/ocfs2/namei.c | 5 | ||||
-rw-r--r-- | fs/ocfs2/super.c | 1 |
3 files changed, 2 insertions, 10 deletions
diff --git a/fs/ocfs2/export.c b/fs/ocfs2/export.c index 6adafa576065..5dbc3062b4fd 100644 --- a/fs/ocfs2/export.c +++ b/fs/ocfs2/export.c | |||
@@ -137,9 +137,7 @@ check_gen: | |||
137 | } | 137 | } |
138 | 138 | ||
139 | result = d_obtain_alias(inode); | 139 | result = d_obtain_alias(inode); |
140 | if (!IS_ERR(result)) | 140 | if (IS_ERR(result)) |
141 | d_set_d_op(result, &ocfs2_dentry_ops); | ||
142 | else | ||
143 | mlog_errno(PTR_ERR(result)); | 141 | mlog_errno(PTR_ERR(result)); |
144 | 142 | ||
145 | bail: | 143 | bail: |
@@ -175,8 +173,6 @@ static struct dentry *ocfs2_get_parent(struct dentry *child) | |||
175 | } | 173 | } |
176 | 174 | ||
177 | parent = d_obtain_alias(ocfs2_iget(OCFS2_SB(dir->i_sb), blkno, 0, 0)); | 175 | parent = d_obtain_alias(ocfs2_iget(OCFS2_SB(dir->i_sb), blkno, 0, 0)); |
178 | if (!IS_ERR(parent)) | ||
179 | d_set_d_op(parent, &ocfs2_dentry_ops); | ||
180 | 176 | ||
181 | bail_unlock: | 177 | bail_unlock: |
182 | ocfs2_inode_unlock(dir, 0); | 178 | ocfs2_inode_unlock(dir, 0); |
diff --git a/fs/ocfs2/namei.c b/fs/ocfs2/namei.c index 30c523144452..849fb4a2e814 100644 --- a/fs/ocfs2/namei.c +++ b/fs/ocfs2/namei.c | |||
@@ -147,7 +147,6 @@ static struct dentry *ocfs2_lookup(struct inode *dir, struct dentry *dentry, | |||
147 | spin_unlock(&oi->ip_lock); | 147 | spin_unlock(&oi->ip_lock); |
148 | 148 | ||
149 | bail_add: | 149 | bail_add: |
150 | d_set_d_op(dentry, &ocfs2_dentry_ops); | ||
151 | ret = d_splice_alias(inode, dentry); | 150 | ret = d_splice_alias(inode, dentry); |
152 | 151 | ||
153 | if (inode) { | 152 | if (inode) { |
@@ -415,7 +414,6 @@ static int ocfs2_mknod(struct inode *dir, | |||
415 | mlog_errno(status); | 414 | mlog_errno(status); |
416 | goto leave; | 415 | goto leave; |
417 | } | 416 | } |
418 | d_set_d_op(dentry, &ocfs2_dentry_ops); | ||
419 | 417 | ||
420 | status = ocfs2_add_entry(handle, dentry, inode, | 418 | status = ocfs2_add_entry(handle, dentry, inode, |
421 | OCFS2_I(inode)->ip_blkno, parent_fe_bh, | 419 | OCFS2_I(inode)->ip_blkno, parent_fe_bh, |
@@ -743,7 +741,6 @@ static int ocfs2_link(struct dentry *old_dentry, | |||
743 | } | 741 | } |
744 | 742 | ||
745 | ihold(inode); | 743 | ihold(inode); |
746 | d_set_d_op(dentry, &ocfs2_dentry_ops); | ||
747 | d_instantiate(dentry, inode); | 744 | d_instantiate(dentry, inode); |
748 | 745 | ||
749 | out_commit: | 746 | out_commit: |
@@ -1797,7 +1794,6 @@ static int ocfs2_symlink(struct inode *dir, | |||
1797 | mlog_errno(status); | 1794 | mlog_errno(status); |
1798 | goto bail; | 1795 | goto bail; |
1799 | } | 1796 | } |
1800 | d_set_d_op(dentry, &ocfs2_dentry_ops); | ||
1801 | 1797 | ||
1802 | status = ocfs2_add_entry(handle, dentry, inode, | 1798 | status = ocfs2_add_entry(handle, dentry, inode, |
1803 | le64_to_cpu(fe->i_blkno), parent_fe_bh, | 1799 | le64_to_cpu(fe->i_blkno), parent_fe_bh, |
@@ -2462,7 +2458,6 @@ int ocfs2_mv_orphaned_inode_to_new(struct inode *dir, | |||
2462 | goto out_commit; | 2458 | goto out_commit; |
2463 | } | 2459 | } |
2464 | 2460 | ||
2465 | d_set_d_op(dentry, &ocfs2_dentry_ops); | ||
2466 | d_instantiate(dentry, inode); | 2461 | d_instantiate(dentry, inode); |
2467 | status = 0; | 2462 | status = 0; |
2468 | out_commit: | 2463 | out_commit: |
diff --git a/fs/ocfs2/super.c b/fs/ocfs2/super.c index 17ff46fa8a10..06d1f749ca89 100644 --- a/fs/ocfs2/super.c +++ b/fs/ocfs2/super.c | |||
@@ -2097,6 +2097,7 @@ static int ocfs2_initialize_super(struct super_block *sb, | |||
2097 | 2097 | ||
2098 | sb->s_fs_info = osb; | 2098 | sb->s_fs_info = osb; |
2099 | sb->s_op = &ocfs2_sops; | 2099 | sb->s_op = &ocfs2_sops; |
2100 | sb->s_d_op = &ocfs2_dentry_ops; | ||
2100 | sb->s_export_op = &ocfs2_export_ops; | 2101 | sb->s_export_op = &ocfs2_export_ops; |
2101 | sb->s_qcop = &ocfs2_quotactl_ops; | 2102 | sb->s_qcop = &ocfs2_quotactl_ops; |
2102 | sb->dq_op = &ocfs2_quota_operations; | 2103 | sb->dq_op = &ocfs2_quota_operations; |