[patch] fuse: fix an error code in fuse_lookup_name()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a static checker fix because we check "outarg->nodeid" here and
then again a in the next if statement.  The difference is that for this
first one we don't set the error code.

Fixes: c180eebe1390 ('fuse: add fuse_lookup_name() helper')
Signed-off-by: Dan Carpenter <dan.carpenter@xxxxxxxxxx>

diff --git a/fs/fuse/dir.c b/fs/fuse/dir.c
index 5e2e087..225fc703 100644
--- a/fs/fuse/dir.c
+++ b/fs/fuse/dir.c
@@ -306,8 +306,7 @@ int fuse_lookup_name(struct super_block *sb, u64 nodeid, struct qstr *name,
 
 	fuse_lookup_init(fc, &args, nodeid, name, outarg);
 	err = fuse_simple_request(fc, &args);
-	/* Zero nodeid is same as -ENOENT, but with valid timeout */
-	if (err || !outarg->nodeid)
+	if (err)
 		goto out_put_forget;
 
 	err = -EIO;
--
To unsubscribe from this list: send the line "unsubscribe kernel-janitors" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Kernel Development]     [Kernel Announce]     [Kernel Newbies]     [Linux Networking Development]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Device Mapper]

  Powered by Linux