diff options
Diffstat (limited to 'fs/gfs2')
-rw-r--r-- | fs/gfs2/dentry.c | 3 | ||||
-rw-r--r-- | fs/gfs2/inode.c | 5 |
2 files changed, 5 insertions, 3 deletions
diff --git a/fs/gfs2/dentry.c b/fs/gfs2/dentry.c index d3a5d4e29ba5..589f4ea9381c 100644 --- a/fs/gfs2/dentry.c +++ b/fs/gfs2/dentry.c | |||
@@ -93,9 +93,6 @@ invalid_gunlock: | |||
93 | if (!had_lock) | 93 | if (!had_lock) |
94 | gfs2_glock_dq_uninit(&d_gh); | 94 | gfs2_glock_dq_uninit(&d_gh); |
95 | invalid: | 95 | invalid: |
96 | if (check_submounts_and_drop(dentry) != 0) | ||
97 | goto valid; | ||
98 | |||
99 | dput(parent); | 96 | dput(parent); |
100 | return 0; | 97 | return 0; |
101 | 98 | ||
diff --git a/fs/gfs2/inode.c b/fs/gfs2/inode.c index fcf42eadb69c..c4ed823d150e 100644 --- a/fs/gfs2/inode.c +++ b/fs/gfs2/inode.c | |||
@@ -1245,6 +1245,9 @@ static int gfs2_atomic_open(struct inode *dir, struct dentry *dentry, | |||
1245 | struct dentry *d; | 1245 | struct dentry *d; |
1246 | bool excl = !!(flags & O_EXCL); | 1246 | bool excl = !!(flags & O_EXCL); |
1247 | 1247 | ||
1248 | if (!d_unhashed(dentry)) | ||
1249 | goto skip_lookup; | ||
1250 | |||
1248 | d = __gfs2_lookup(dir, dentry, file, opened); | 1251 | d = __gfs2_lookup(dir, dentry, file, opened); |
1249 | if (IS_ERR(d)) | 1252 | if (IS_ERR(d)) |
1250 | return PTR_ERR(d); | 1253 | return PTR_ERR(d); |
@@ -1261,6 +1264,8 @@ static int gfs2_atomic_open(struct inode *dir, struct dentry *dentry, | |||
1261 | } | 1264 | } |
1262 | 1265 | ||
1263 | BUG_ON(d != NULL); | 1266 | BUG_ON(d != NULL); |
1267 | |||
1268 | skip_lookup: | ||
1264 | if (!(flags & O_CREAT)) | 1269 | if (!(flags & O_CREAT)) |
1265 | return -ENOENT; | 1270 | return -ENOENT; |
1266 | 1271 | ||