diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2016-05-02 19:49:46 -0400 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2016-05-02 19:49:46 -0400 |
commit | df889b363198d946c0286b3fb2cfcca18d08a029 (patch) | |
tree | 22846d29e33c6f01058d76b7aeccd64baa50731a /fs/namei.c | |
parent | ce8644fcadc52da72e19ae9f0866fb3eb15d3df4 (diff) | |
parent | 10c64cea04d3c75c306b3f990586ffb343b63287 (diff) |
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; |