summaryrefslogtreecommitdiffstats
path: root/fs/namei.c
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2016-04-27 22:52:17 +0200
committerAl Viro <viro@zeniv.linux.org.uk>2016-05-03 01:51:12 +0200
commit9d0728e16e9269f368a6217b34166999c8ba2f3e (patch)
treefdac491190a992698372e8b9b568b1483830a49b /fs/namei.c
parentatomic_open(): don't bother with EEXIST check - it's done in do_last() (diff)
downloadlinux-9d0728e16e9269f368a6217b34166999c8ba2f3e.tar.xz
linux-9d0728e16e9269f368a6217b34166999c8ba2f3e.zip
atomic_open(): consolidate "overridden ENOENT" in open-yourself cases
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs/namei.c')
-rw-r--r--fs/namei.c9
1 files changed, 1 insertions, 8 deletions
diff --git a/fs/namei.c b/fs/namei.c
index eec7c0aa446d..36520fc23746 100644
--- a/fs/namei.c
+++ b/fs/namei.c
@@ -2908,13 +2908,6 @@ static int atomic_open(struct nameidata *nd, struct dentry *dentry,
}
if (*opened & FILE_CREATED)
fsnotify_create(dir, dentry);
- if (!dentry->d_inode) {
- WARN_ON(*opened & FILE_CREATED);
- if (create_error) {
- error = create_error;
- goto out;
- }
- }
goto looked_up;
}
@@ -2942,11 +2935,11 @@ no_open:
if (IS_ERR(dentry))
return PTR_ERR(dentry);
}
+looked_up:
if (create_error && !dentry->d_inode) {
error = create_error;
goto out;
}
-looked_up:
path->dentry = dentry;
path->mnt = nd->path.mnt;
return 1;