Commit 0797c854 authored by Benjamin Coddington's avatar Benjamin Coddington Committed by Greg Kroah-Hartman
Browse files

NFSv4.2: Fixup CLONE dest file size for zero-length count



[ Upstream commit 038efb63 ]

When holding a delegation, the NFS client optimizes away setting the
attributes of a file from the GETATTR in the compound after CLONE, and for
a zero-length CLONE we will end up setting the inode's size to zero in
nfs42_copy_dest_done().  Handle this case by computing the resulting count
from the server's reported size after CLONE's GETATTR.

Suggested-by: default avatarTrond Myklebust <trond.myklebust@hammerspace.com>
Signed-off-by: default avatarBenjamin Coddington <bcodding@redhat.com>
Fixes: 94d202d5 ("NFSv42: Copy offload should update the file size when appropriate")
Signed-off-by: default avatarAnna Schumaker <Anna.Schumaker@Netapp.com>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
parent d59722d0
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment