nfsd: fix compose_entry_fh() failure exits
authorAl Viro <viro@zeniv.linux.org.uk>
Fri, 13 Apr 2012 04:32:14 +0000 (00:32 -0400)
committerBen Hutchings <ben@decadent.org.uk>
Fri, 11 May 2012 12:14:12 +0000 (13:14 +0100)
commit120aa796a02fbe93143bdb1fe2b1d313e41b85b1
tree3337a080408d7485c9fce1988e488292faae3c54
parent618b2439559333942fe8debd369a1b313da8286e
nfsd: fix compose_entry_fh() failure exits

commit efe39651f08813180f37dc508d950fc7d92b29a8 upstream.

Restore the original logics ("fail on mountpoints, negatives and in
case of fh_compose() failures").  Since commit 8177e (nfsd: clean up
readdirplus encoding) that got broken -
rv = fh_compose(fhp, exp, dchild, &cd->fh);
if (rv)
       goto out;
if (!dchild->d_inode)
goto out;
rv = 0;
out:
is equivalent to
rv = fh_compose(fhp, exp, dchild, &cd->fh);
out:
and the second check has no effect whatsoever...

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
fs/nfsd/nfs3xdr.c