Messages in this thread | | | From | David Howells <> | Subject | Re: [PATCH] EXPORTFS: handle NULL returns from fh_to_dentry()/fh_to_parent() | Date | Tue, 09 Dec 2008 10:30:11 +0000 |
| |
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
| |