xfs: failure mapping nfs fh to inode should return ESTALE
authorJ. Bruce Fields <bfields@redhat.com>
Thu, 14 Jul 2011 20:50:36 +0000 (20:50 +0000)
committerAlex Elder <aelder@sgi.com>
Wed, 20 Jul 2011 23:35:21 +0000 (18:35 -0500)
On xfs exports, nfsd is incorrectly returning ENOENT instead of
ESTALE on attempts to use a filehandle of a deleted file (spotted
with pynfs test PUTFH3).  The ENOENT was coming from xfs_iget.

(It's tempting to wonder whether we should just map all xfs_iget
errors to ESTALE, but I don't believe so--xfs_iget can also return
ENOMEM at least, which we wouldn't want mapped to ESTALE.)

While we're at it, the other return of ENOENT in xfs_nfs_get_inode()
also looks wrong.

Signed-off-by: J. Bruce Fields <bfields@redhat.com>
Signed-off-by: Alex Elder <aelder@sgi.com>

No differences found