summaryrefslogtreecommitdiffstats
path: root/fs/exportfs
diff options
context:
space:
mode:
authorYueHaibing <yuehaibing@huawei.com>2018-11-19 04:32:41 +0100
committerAl Viro <viro@zeniv.linux.org.uk>2018-11-19 05:47:56 +0100
commit909e22e05353a783c526829427e9a8de122fba9c (patch)
tree40c9478aa149c9ad8d6fc151bf6f6ceba2edb0fb /fs/exportfs
parentaio: fix failure to put the file pointer (diff)
downloadlinux-909e22e05353a783c526829427e9a8de122fba9c.tar.xz
linux-909e22e05353a783c526829427e9a8de122fba9c.zip
exportfs: fix 'passing zero to ERR_PTR()' warning
Fix a static code checker warning: fs/exportfs/expfs.c:171 reconnect_one() warn: passing zero to 'ERR_PTR' The error path for lookup_one_len_unlocked failure should set err to PTR_ERR. Fixes: bbf7a8a3562f ("exportfs: move most of reconnect_path to helper function") Signed-off-by: YueHaibing <yuehaibing@huawei.com> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs/exportfs')
-rw-r--r--fs/exportfs/expfs.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/fs/exportfs/expfs.c b/fs/exportfs/expfs.c
index 645158dc33f1..c8a3dfda1764 100644
--- a/fs/exportfs/expfs.c
+++ b/fs/exportfs/expfs.c
@@ -147,6 +147,7 @@ static struct dentry *reconnect_one(struct vfsmount *mnt,
tmp = lookup_one_len_unlocked(nbuf, parent, strlen(nbuf));
if (IS_ERR(tmp)) {
dprintk("%s: lookup failed: %d\n", __func__, PTR_ERR(tmp));
+ err = PTR_ERR(tmp);
goto out_err;
}
if (tmp != dentry) {