knfsd: don't bother mapping putrootfh enoent to eperm
authorJ. Bruce Fields <bfields@citi.umich.edu>
Mon, 21 Jan 2008 17:20:45 +0000 (12:20 -0500)
committerJ. Bruce Fields <bfields@citi.umich.edu>
Fri, 1 Feb 2008 21:42:15 +0000 (16:42 -0500)
commitf7b8066f9ff68016489ff6f9fb358aa59bd14e1b
treecf4e6e2d0cefcd9dcd44a65b11f5fcfb28c497c9
parent4b8449af75fa2e2d9736ec503a818be626a4e763
knfsd: don't bother mapping putrootfh enoent to eperm

Neither EPERM and ENOENT map to valid errors for PUTROOTFH according to
rfc 3530, and, if anything, ENOENT is likely to be slightly more
informative; so don't bother mapping ENOENT to EPERM.  (Probably this
was originally done because one likely cause was that there is an fsid=0
export but that it isn't permitted to this particular client.  Now that
we allow WRONGSEC returns, this is somewhat less likely.)

In the long term we should work to make this situation less likely,
perhaps by turning off nfsv4 service entirely in the absence of the
pseudofs root, or constructing a pseudofilesystem root ourselves in the
kernel as necessary.

Thanks to Benny Halevy <bhalevy@panasas.com> for pointing out this
problem.

Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
Cc: Benny Halevy <bhalevy@panasas.com>
fs/nfsd/export.c