diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2010-12-18 12:06:56 -0500 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2011-01-12 20:02:46 -0500 |
commit | 41ced6dcf3dc6b901716fda0dc8de3536da4d39b (patch) | |
tree | cffec5e5bde8d8a580c03cef8eea2ddb9a821d8a /fs/gfs2 | |
parent | 1c929cfe6d8f2087a337a868fbf6c38d56bb4889 (diff) |
switch gfs2, close races
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs/gfs2')
-rw-r--r-- | fs/gfs2/export.c | 13 | ||||
-rw-r--r-- | fs/gfs2/ops_fstype.c | 2 | ||||
-rw-r--r-- | fs/gfs2/ops_inode.c | 2 |
3 files changed, 3 insertions, 14 deletions
diff --git a/fs/gfs2/export.c b/fs/gfs2/export.c index 97012ecff560..9023db8184f9 100644 --- a/fs/gfs2/export.c +++ b/fs/gfs2/export.c | |||
@@ -126,12 +126,7 @@ static int gfs2_get_name(struct dentry *parent, char *name, | |||
126 | 126 | ||
127 | static struct dentry *gfs2_get_parent(struct dentry *child) | 127 | static struct dentry *gfs2_get_parent(struct dentry *child) |
128 | { | 128 | { |
129 | struct dentry *dentry; | 129 | return d_obtain_alias(gfs2_lookupi(child->d_inode, &gfs2_qdotdot, 1)); |
130 | |||
131 | dentry = d_obtain_alias(gfs2_lookupi(child->d_inode, &gfs2_qdotdot, 1)); | ||
132 | if (!IS_ERR(dentry)) | ||
133 | d_set_d_op(dentry, &gfs2_dops); | ||
134 | return dentry; | ||
135 | } | 130 | } |
136 | 131 | ||
137 | static struct dentry *gfs2_get_dentry(struct super_block *sb, | 132 | static struct dentry *gfs2_get_dentry(struct super_block *sb, |
@@ -139,7 +134,6 @@ static struct dentry *gfs2_get_dentry(struct super_block *sb, | |||
139 | { | 134 | { |
140 | struct gfs2_sbd *sdp = sb->s_fs_info; | 135 | struct gfs2_sbd *sdp = sb->s_fs_info; |
141 | struct inode *inode; | 136 | struct inode *inode; |
142 | struct dentry *dentry; | ||
143 | 137 | ||
144 | inode = gfs2_ilookup(sb, inum->no_addr); | 138 | inode = gfs2_ilookup(sb, inum->no_addr); |
145 | if (inode) { | 139 | if (inode) { |
@@ -156,10 +150,7 @@ static struct dentry *gfs2_get_dentry(struct super_block *sb, | |||
156 | return ERR_CAST(inode); | 150 | return ERR_CAST(inode); |
157 | 151 | ||
158 | out_inode: | 152 | out_inode: |
159 | dentry = d_obtain_alias(inode); | 153 | return d_obtain_alias(inode); |
160 | if (!IS_ERR(dentry)) | ||
161 | d_set_d_op(dentry, &gfs2_dops); | ||
162 | return dentry; | ||
163 | } | 154 | } |
164 | 155 | ||
165 | static struct dentry *gfs2_fh_to_dentry(struct super_block *sb, struct fid *fid, | 156 | static struct dentry *gfs2_fh_to_dentry(struct super_block *sb, struct fid *fid, |
diff --git a/fs/gfs2/ops_fstype.c b/fs/gfs2/ops_fstype.c index 2aeabd4218cc..693f4470a2df 100644 --- a/fs/gfs2/ops_fstype.c +++ b/fs/gfs2/ops_fstype.c | |||
@@ -440,7 +440,6 @@ static int gfs2_lookup_root(struct super_block *sb, struct dentry **dptr, | |||
440 | iput(inode); | 440 | iput(inode); |
441 | return -ENOMEM; | 441 | return -ENOMEM; |
442 | } | 442 | } |
443 | d_set_d_op(dentry, &gfs2_dops); | ||
444 | *dptr = dentry; | 443 | *dptr = dentry; |
445 | return 0; | 444 | return 0; |
446 | } | 445 | } |
@@ -1106,6 +1105,7 @@ static int fill_super(struct super_block *sb, struct gfs2_args *args, int silent | |||
1106 | 1105 | ||
1107 | sb->s_magic = GFS2_MAGIC; | 1106 | sb->s_magic = GFS2_MAGIC; |
1108 | sb->s_op = &gfs2_super_ops; | 1107 | sb->s_op = &gfs2_super_ops; |
1108 | sb->s_d_op = &gfs2_dops; | ||
1109 | sb->s_export_op = &gfs2_export_ops; | 1109 | sb->s_export_op = &gfs2_export_ops; |
1110 | sb->s_xattr = gfs2_xattr_handlers; | 1110 | sb->s_xattr = gfs2_xattr_handlers; |
1111 | sb->s_qcop = &gfs2_quotactl_ops; | 1111 | sb->s_qcop = &gfs2_quotactl_ops; |
diff --git a/fs/gfs2/ops_inode.c b/fs/gfs2/ops_inode.c index 1501db4f0e6d..ae140c8abb5c 100644 --- a/fs/gfs2/ops_inode.c +++ b/fs/gfs2/ops_inode.c | |||
@@ -106,8 +106,6 @@ static struct dentry *gfs2_lookup(struct inode *dir, struct dentry *dentry, | |||
106 | { | 106 | { |
107 | struct inode *inode = NULL; | 107 | struct inode *inode = NULL; |
108 | 108 | ||
109 | d_set_d_op(dentry, &gfs2_dops); | ||
110 | |||
111 | inode = gfs2_lookupi(dir, &dentry->d_name, 0); | 109 | inode = gfs2_lookupi(dir, &dentry->d_name, 0); |
112 | if (inode && IS_ERR(inode)) | 110 | if (inode && IS_ERR(inode)) |
113 | return ERR_CAST(inode); | 111 | return ERR_CAST(inode); |