Skip to content

Commit 909e22e

Browse files
YueHaibingAl Viro
authored andcommitted
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: bbf7a8a ("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>
1 parent 53fffe2 commit 909e22e

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

fs/exportfs/expfs.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -147,6 +147,7 @@ static struct dentry *reconnect_one(struct vfsmount *mnt,
147147
tmp = lookup_one_len_unlocked(nbuf, parent, strlen(nbuf));
148148
if (IS_ERR(tmp)) {
149149
dprintk("%s: lookup failed: %d\n", __func__, PTR_ERR(tmp));
150+
err = PTR_ERR(tmp);
150151
goto out_err;
151152
}
152153
if (tmp != dentry) {

0 commit comments

Comments
 (0)