aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKonstantin Belousov <kib@FreeBSD.org>2023-12-29 23:22:40 +0000
committerKonstantin Belousov <kib@FreeBSD.org>2024-01-05 04:56:17 +0000
commit7dae1467d72ae1f5c8f7be0f7444da23a457d98b (patch)
treef125c43cc158b5df41cc8f457adf5969faf391d7
parent987446fa39e8f6887ea16ad49f00f699b2efd210 (diff)
downloadsrc-7dae1467d72ae1f5c8f7be0f7444da23a457d98b.tar.gz
src-7dae1467d72ae1f5c8f7be0f7444da23a457d98b.zip
nfsclient copy_file_range(): flush dst vnode data
Otherwise server-side copy makes the client cache inconsistent with the server data. Reported by: asomers PR: 276002 Reviewed by: rmacklem Tested by: pho Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D43250
-rw-r--r--sys/fs/nfsclient/nfs_clvnops.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/fs/nfsclient/nfs_clvnops.c b/sys/fs/nfsclient/nfs_clvnops.c
index a690e988b4b3..f86ecd53ad4e 100644
--- a/sys/fs/nfsclient/nfs_clvnops.c
+++ b/sys/fs/nfsclient/nfs_clvnops.c
@@ -3956,7 +3956,7 @@ generic_copy:
if (error == 0)
error = ncl_flush(invp, MNT_WAIT, curthread, 1, 0);
if (error == 0)
- error = ncl_flush(outvp, MNT_WAIT, curthread, 1, 0);
+ error = ncl_vinvalbuf(outvp, V_SAVE, curthread, 0);
/* Do the actual NFSv4.2 RPC. */
ret = ret2 = 0;