diff options
author | Alex Shi <alex.shi@linaro.org> | 2016-05-24 12:18:13 +0800 |
---|---|---|
committer | Alex Shi <alex.shi@linaro.org> | 2016-05-24 12:18:13 +0800 |
commit | 0a296a966f183e4ef1fcb37940940e8df8c4f258 (patch) | |
tree | f3715d78e72389582ce2ad5dc5c59051f1814b4b /fs/namei.c | |
parent | 03d8016839b087e141e26472fabcf860bc05cf7d (diff) | |
parent | e429f243df2823451c92227317e5fce5f310b674 (diff) |
Merge tag 'v4.1.25' into linux-linaro-lsk-v4.1lsk-v4.1-16.05
This is the 4.1.25 stable release
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 f3cc848da8bc..c7a6eabc02a5 100644 --- a/fs/namei.c +++ b/fs/namei.c @@ -2839,22 +2839,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; |