diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2016-04-27 16:52:17 -0400 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2016-05-02 19:51:12 -0400 |
commit | 9d0728e16e9269f368a6217b34166999c8ba2f3e (patch) | |
tree | fdac491190a992698372e8b9b568b1483830a49b | |
parent | 5249e411b4d456762641d98eb6aad22da4e0a30d (diff) | |
download | op-kernel-dev-9d0728e16e9269f368a6217b34166999c8ba2f3e.zip op-kernel-dev-9d0728e16e9269f368a6217b34166999c8ba2f3e.tar.gz |
atomic_open(): consolidate "overridden ENOENT" in open-yourself cases
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
-rw-r--r-- | fs/namei.c | 9 |
1 files changed, 1 insertions, 8 deletions
@@ -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; |