]> git.baikalelectronics.ru Git - kernel.git/commit
nfsd: Ensure CLONE persists data and metadata changes to the target file
authorTrond Myklebust <trondmy@gmail.com>
Wed, 27 Nov 2019 22:05:51 +0000 (17:05 -0500)
committerJ. Bruce Fields <bfields@redhat.com>
Sat, 30 Nov 2019 19:55:38 +0000 (14:55 -0500)
commit56084fa2d55fc6fdbfaa4d391d51268170bf97f3
tree7ae7376eae2f736843731a269c3a77f7920317d0
parent9f0c6596afd4e649be0c4fb88d3d7f6e018a4d64
nfsd: Ensure CLONE persists data and metadata changes to the target file

The NFSv4.2 CLONE operation has implicit persistence requirements on the
target file, since there is no protocol requirement that the client issue
a separate operation to persist data.
For that reason, we should call vfs_fsync_range() on the destination file
after a successful call to vfs_clone_file_range().

Fixes: a7975e7821d8 ("nfsd: implement the NFSv4.2 CLONE operation")
Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com>
Cc: stable@vger.kernel.org # v4.5+
Signed-off-by: J. Bruce Fields <bfields@redhat.com>
fs/nfsd/nfs4proc.c
fs/nfsd/vfs.c
fs/nfsd/vfs.h