kernel-janitors.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Dan Carpenter <dan.carpenter@oracle.com>
To: kernel-janitors@vger.kernel.org
Subject: [patch] fuse: fix an error code in fuse_lookup_name()
Date: Sat, 08 Aug 2015 13:01:34 +0000	[thread overview]
Message-ID: <20150808130134.GA8034@mwanda> (raw)

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@oracle.com>

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;

             reply	other threads:[~2015-08-08 13:01 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-08-08 13:01 Dan Carpenter [this message]
2015-08-10 18:45 ` [fuse-devel] [patch] fuse: fix an error code in fuse_lookup_name() Ashish Samant
2015-08-12  9:22 ` Miklos Szeredi

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20150808130134.GA8034@mwanda \
    --to=dan.carpenter@oracle.com \
    --cc=kernel-janitors@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).