From bd01a69f4836994b50b492883fb5367db41fb506 Mon Sep 17 00:00:00 2001 From: Konstantin Belousov Date: Sat, 23 Jan 2021 23:40:07 +0200 Subject: [PATCH] nfs_write(): do not call ncl_pager_setsize() after clearing TDP2_SBPAGES This might unnecessary truncate file undoing extension done by the write. Reported by: Yasuhiro Kimura Reviewed by: rmacklem Tested by: rmacklem, Yasuhiro Kimura MFC after: 6 days Sponsored by: The FreeBSD Foundation --- sys/fs/nfsclient/nfs_clbio.c | 5 ----- 1 file changed, 5 deletions(-) diff --git a/sys/fs/nfsclient/nfs_clbio.c b/sys/fs/nfsclient/nfs_clbio.c index 7d0ff0abff3..832b44b99c8 100644 --- a/sys/fs/nfsclient/nfs_clbio.c +++ b/sys/fs/nfsclient/nfs_clbio.c @@ -1286,11 +1286,6 @@ again: out: curthread_pflags2_restore(save2); - if ((curthread->td_pflags2 & TDP2_SBPAGES) == 0) { - NFSLOCKNODE(np); - ncl_pager_setsize(vp, NULL); - } - return (error); }