aboutsummaryrefslogtreecommitdiff
path: root/fs/namei.c
diff options
context:
space:
mode:
authorAlex Shi <alex.shi@linaro.org>2016-03-18 12:02:41 +0800
committerAlex Shi <alex.shi@linaro.org>2016-03-18 12:02:41 +0800
commit5cc3b58828a8bb2ebb34de96d1aec1564f912a31 (patch)
tree2694db57173168b3a222c25c3372cdef0b17924f /fs/namei.c
parentc24745baffdb7143d6f345659fb6d781b070ca50 (diff)
parent7f30737678023b5becaf0e2e012665f71b886a7d (diff)
Merge tag 'v4.1.20' into linux-linaro-lsk-v4.1lsk-v4.1-16.03
This is the 4.1.20 stable release
Diffstat (limited to 'fs/namei.c')
-rw-r--r--fs/namei.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/fs/namei.c b/fs/namei.c
index ccd7f98d85b9..f3cc848da8bc 100644
--- a/fs/namei.c
+++ b/fs/namei.c
@@ -1619,10 +1619,10 @@ static inline int walk_component(struct nameidata *nd, struct path *path,
if (err < 0)
goto out_err;
- inode = path->dentry->d_inode;
err = -ENOENT;
if (d_is_negative(path->dentry))
goto out_path_put;
+ inode = path->dentry->d_inode;
}
if (should_follow_link(path->dentry, follow)) {
@@ -3078,6 +3078,7 @@ retry_lookup:
path_to_nameidata(path, nd);
goto out;
}
+ inode = path->dentry->d_inode;
finish_lookup:
/* we _can_ be in RCU mode here */
if (should_follow_link(path->dentry, !symlink_ok)) {
@@ -3152,6 +3153,10 @@ opened:
goto exit_fput;
}
out:
+ if (unlikely(error > 0)) {
+ WARN_ON(1);
+ error = -EINVAL;
+ }
if (got_write)
mnt_drop_write(nd->path.mnt);
path_put(&save_parent);