diff options
author | Trond Myklebust <trond.myklebust@hammerspace.com> | 2025-09-06 10:54:13 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2025-09-19 16:35:44 +0200 |
commit | e1651ba799d4bd7c68e60a07fe2cdd4220377029 (patch) | |
tree | 43128151f75f663f4769d466ab0f4eb7187960f7 | |
parent | fc0e6342ad8a16d4ab2a42693c0dadac82ff6662 (diff) |
NFSv4.2: Serialise O_DIRECT i/o and copy range
[ Upstream commit ca247c89900ae90207f4d321e260cd93b7c7d104 ]
Ensure that all O_DIRECT reads and writes complete before copying a file
range, so that the destination is up to date.
Fixes: a5864c999de6 ("NFS: Do not serialise O_DIRECT reads and writes")
Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
-rw-r--r-- | fs/nfs/nfs42proc.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/fs/nfs/nfs42proc.c b/fs/nfs/nfs42proc.c index 66fe885fc19a..582cf8a46956 100644 --- a/fs/nfs/nfs42proc.c +++ b/fs/nfs/nfs42proc.c @@ -356,6 +356,7 @@ static ssize_t _nfs42_proc_copy(struct file *src, return status; } + nfs_file_block_o_direct(NFS_I(dst_inode)); status = nfs_sync_inode(dst_inode); if (status) return status; |