Skip to content

Commit c288e4c

Browse files
Trond Myklebustgregkh
authored andcommitted
NFSv4.2: Serialise O_DIRECT i/o and copy range
[ Upstream commit ca247c8 ] Ensure that all O_DIRECT reads and writes complete before copying a file range, so that the destination is up to date. Fixes: a5864c9 ("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>
1 parent 9f2fdb1 commit c288e4c

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

fs/nfs/nfs42proc.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -356,6 +356,7 @@ static ssize_t _nfs42_proc_copy(struct file *src,
356356
return status;
357357
}
358358

359+
nfs_file_block_o_direct(NFS_I(dst_inode));
359360
status = nfs_sync_inode(dst_inode);
360361
if (status)
361362
return status;

0 commit comments

Comments
 (0)