]> git.karo-electronics.de Git - karo-tx-linux.git/commit
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)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 27 Apr 2012 17:16:52 +0000 (10:16 -0700)
commita0b81f202cdf44cd9dbbab769bfaa42701785cc7
tree8174f0cd0fabe9292a28c6c46f5d58d9026a7874
parent1022d6b6504962323098fee89f7cbd6fdd4fbc87
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>
Cc: "J. Bruce Fields" <bfields@fieldses.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
fs/nfsd/nfs3xdr.c