From: David Howells <dhowells@redhat.com>
To: "J. Bruce Fields" <bfields@fieldses.org>
Cc: dhowells@redhat.com,
Linus Torvalds <torvalds@linux-foundation.org>,
Andrew Morton <akpm@linux-foundation.org>,
hugh@veritas.com, hch@infradead.org,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] EXPORTFS: handle NULL returns from fh_to_dentry()/fh_to_parent()
Date: Tue, 09 Dec 2008 10:30:11 +0000 [thread overview]
Message-ID: <30673.1228818611@redhat.com> (raw)
In-Reply-To: <20081208232418.GJ19417@fieldses.org>
J. Bruce Fields <bfields@fieldses.org> wrote:
> + if (!result)
> + result = ERR_PTR(-ESTALE);
> if (IS_ERR(result))
> return result;
This is why I think this is a bad idea. This adds an extra conditional test
and branch. In fact, the way you've done it means you have to do the extra
branch whatever[*]; it might be better to have the if-statement you added
return directly.
[*] assuming gcc doesn't manage to be clever enough to omit the second test if
the first is true.
David
prev parent reply other threads:[~2008-12-09 10:31 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-12-05 16:23 [PATCH] EXPORTFS: Don't return NULL from fh_to_dentry()/fh_to_parent() [ver #4] David Howells
2008-12-05 16:39 ` Hugh Dickins
2008-12-05 16:52 ` Linus Torvalds
2008-12-05 17:42 ` J. Bruce Fields
2008-12-09 9:52 ` Christoph Hellwig
2008-12-05 18:49 ` David Howells
2008-12-05 19:02 ` Linus Torvalds
2008-12-08 23:24 ` [PATCH] EXPORTFS: handle NULL returns from fh_to_dentry()/fh_to_parent() J. Bruce Fields
2008-12-09 10:30 ` David Howells [this message]
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=30673.1228818611@redhat.com \
--to=dhowells@redhat.com \
--cc=akpm@linux-foundation.org \
--cc=bfields@fieldses.org \
--cc=hch@infradead.org \
--cc=hugh@veritas.com \
--cc=linux-kernel@vger.kernel.org \
--cc=torvalds@linux-foundation.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.