From 2ce650e75a4ef475fa9762506bcffa65f19b98f6 Mon Sep 17 00:00:00 2001 From: rmacklem Date: Fri, 9 Apr 2010 01:14:39 +0000 Subject: [PATCH] MFC: r205661 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. git-svn-id: svn://svn.freebsd.org/base/stable/8@206406 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f --- sys/nfsserver/nfs_srvsubs.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/sys/nfsserver/nfs_srvsubs.c b/sys/nfsserver/nfs_srvsubs.c index d84261e82..f2e9d510e 100644 --- a/sys/nfsserver/nfs_srvsubs.c +++ b/sys/nfsserver/nfs_srvsubs.c @@ -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; -- 2.45.0