From 8583f92fdf265442bc56bd687e4b52a0adf2658a Mon Sep 17 00:00:00 2001 From: Rick Macklem Date: Wed, 28 Apr 2010 23:16:21 +0000 Subject: [PATCH] For the experimental NFS client, it should always flush dirty buffers before closing the NFSv4 opens, as the comment states. This patch deletes the call to nfscl_mustflush() which would return 0 for the case where a delegation still exists, which was incorrect and could cause crashes during recovery from an expired lease. MFC after: 1 week --- sys/fs/nfsclient/nfs_clnode.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/sys/fs/nfsclient/nfs_clnode.c b/sys/fs/nfsclient/nfs_clnode.c index c1337427fd2..e36431fa0ec 100644 --- a/sys/fs/nfsclient/nfs_clnode.c +++ b/sys/fs/nfsclient/nfs_clnode.c @@ -198,8 +198,7 @@ ncl_inactive(struct vop_inactive_args *ap) * must be flushed before the close, so that the stateid is * available for the writes. */ - if (nfscl_mustflush(vp)) - (void) ncl_flush(vp, MNT_WAIT, NULL, ap->a_td, 1, 0); + (void) ncl_flush(vp, MNT_WAIT, NULL, ap->a_td, 1, 0); (void) nfsrpc_close(vp, 1, ap->a_td); }