From: Matthew Dillon Date: Fri, 23 Mar 2012 20:38:29 +0000 (-0700) Subject: kernel - Improve NFS server error responses when an inode goes away X-Git-Tag: v3.0.3~87 X-Git-Url: https://gitweb.dragonflybsd.org/dragonfly.git/commitdiff_plain/45ca23e3ebb1a0d433018c0f2ce762366f1234fe kernel - Improve NFS server error responses when an inode goes away * When an inode goes away and FHTOVP fails return ESTALE instead of what the VFS returned. * Greatly improves the re-acquisition of files on NFS clients which have been ripped out by the server or other clients. --- diff --git a/sys/vfs/nfs/nfs_subs.c b/sys/vfs/nfs/nfs_subs.c index 3e98d5fd7d..0e12c6cb13 100644 --- a/sys/vfs/nfs/nfs_subs.c +++ b/sys/vfs/nfs/nfs_subs.c @@ -1228,7 +1228,7 @@ nfsrv_fhtovp(fhandle_t *fhp, int lockflag, return (error); error = VFS_FHTOVP(mp, NULL, &fhp->fh_fid, vpp); if (error) - return (error); + return (ESTALE); #ifdef MNT_EXNORESPORT if (!(exflags & (MNT_EXNORESPORT|MNT_EXPUBLIC))) { saddr = (struct sockaddr_in *)nam;