Patch the regular NFS server so that it returns ESTALE to the client

for all errors returned by VFS_FHTOVP(). This is required to ensure
that EIO doesn't get returned to the client when ZFS is used as the
server file system.

Tested by:	korvus AT comcast.net
Reviewed by:	jhb
MFC after:	2 weeks
This commit is contained in:
Rick Macklem 2010-03-26 01:19:29 +00:00
parent d4425a31a5
commit 6cdfa1ce97
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=205661

View File

@ -1128,6 +1128,9 @@ nfsrv_fhtovp(fhandle_t *fhp, int lockflag, struct vnode **vpp, int *vfslockedp,
}
}
error = VFS_FHTOVP(mp, &fhp->fh_fid, vpp);
if (error != 0)
/* Make sure the server replies ESTALE to the client. */
error = ESTALE;
vfs_unbusy(mp);
if (error)
goto out;