diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2016-05-03 01:49:46 +0200 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2016-05-03 01:49:46 +0200 |
commit | df889b363198d946c0286b3fb2cfcca18d08a029 (patch) | |
tree | 22846d29e33c6f01058d76b7aeccd64baa50731a /fs/namei.c | |
parent | lookup_open(): expand the call of vfs_create() (diff) | |
parent | atomic_open(): fix the handling of create_error (diff) | |
download | linux-df889b363198d946c0286b3fb2cfcca18d08a029.tar.xz linux-df889b363198d946c0286b3fb2cfcca18d08a029.zip |
Merge branch 'for-linus' into work.lookups
Diffstat (limited to 'fs/namei.c')
-rw-r--r-- | fs/namei.c | 20 |
1 files changed, 4 insertions, 16 deletions
diff --git a/fs/namei.c b/fs/namei.c index f2d55c835bb9..85d19e6cc8c0 100644 --- a/fs/namei.c +++ b/fs/namei.c @@ -2946,22 +2946,10 @@ no_open: dentry = lookup_real(dir, dentry, nd->flags); if (IS_ERR(dentry)) return PTR_ERR(dentry); - - if (create_error) { - int open_flag = op->open_flag; - - error = create_error; - if ((open_flag & O_EXCL)) { - if (!dentry->d_inode) - goto out; - } else if (!dentry->d_inode) { - goto out; - } else if ((open_flag & O_TRUNC) && - d_is_reg(dentry)) { - goto out; - } - /* will fail later, go on to get the right error */ - } + } + if (create_error && !dentry->d_inode) { + error = create_error; + goto out; } looked_up: path->dentry = dentry; |