git: 7dae1467d72a - main - nfsclient copy_file_range(): flush dst vnode data
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Fri, 05 Jan 2024 05:00:46 UTC
The branch main has been updated by kib:
URL: https://cgit.FreeBSD.org/src/commit/?id=7dae1467d72ae1f5c8f7be0f7444da23a457d98b
commit 7dae1467d72ae1f5c8f7be0f7444da23a457d98b
Author: Konstantin Belousov <kib@FreeBSD.org>
AuthorDate: 2023-12-29 23:22:40 +0000
Commit: Konstantin Belousov <kib@FreeBSD.org>
CommitDate: 2024-01-05 04:56:17 +0000
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
---
sys/fs/nfsclient/nfs_clvnops.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
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;