fuse: remove duplicate check for nodeid
authorzyfjeff <zyfjeff@linux.alibaba.com>
Tue, 13 Dec 2022 11:51:47 +0000 (19:51 +0800)
committerMiklos Szeredi <mszeredi@redhat.com>
Wed, 7 Jun 2023 14:26:34 +0000 (16:26 +0200)
before this check, the nodeid has already been checked once, so
the check here doesn't make an sense, so remove the check for
nodeid here.

            if (err || !outarg->nodeid)
                    goto out_put_forget;

            err = -EIO;
    >>>     if (!outarg->nodeid)
                    goto out_put_forget;

Signed-off-by: zyfjeff <zyfjeff@linux.alibaba.com>
Signed-off-by: Miklos Szeredi <mszeredi@redhat.com>
fs/fuse/dir.c

index 35bc174f9ba21942ba4a01e6d2b99abee16dc1ed..5a4a7155cf1cd36adfa3c64c95a2ae3c1b1feb2a 100644 (file)
@@ -395,8 +395,6 @@ int fuse_lookup_name(struct super_block *sb, u64 nodeid, const struct qstr *name
                goto out_put_forget;
 
        err = -EIO;
-       if (!outarg->nodeid)
-               goto out_put_forget;
        if (fuse_invalid_attr(&outarg->attr))
                goto out_put_forget;