summaryrefslogtreecommitdiffstats
path: root/fs/bfs
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2017-02-20 07:21:33 +0100
committerBen Hutchings <ben@decadent.org.uk>2017-06-05 21:17:12 +0100
commitcc4d5dc73841b98d33cdfb9822d70b0aac4beca5 (patch)
tree51ba0634d7c71dbf940e7e71feb39ef4d838fd95 /fs/bfs
parent24d8167113803f8b9196f8131cbc97d49c6179ef (diff)
downloadlinux-stable-cc4d5dc73841b98d33cdfb9822d70b0aac4beca5.tar.gz
linux-stable-cc4d5dc73841b98d33cdfb9822d70b0aac4beca5.tar.bz2
linux-stable-cc4d5dc73841b98d33cdfb9822d70b0aac4beca5.zip
nfsd: special case truncates some more
commit 783112f7401ff449d979530209b3f6c2594fdb4e upstream. Both the NFS protocols and the Linux VFS use a setattr operation with a bitmap of attributes to set to set various file attributes including the file size and the uid/gid. The Linux syscalls never mix size updates with unrelated updates like the uid/gid, and some file systems like XFS and GFS2 rely on the fact that truncates don't update random other attributes, and many other file systems handle the case but do not update the other attributes in the same transaction. NFSD on the other hand passes the attributes it gets on the wire more or less directly through to the VFS, leading to updates the file systems don't expect. XFS at least has an assert on the allowed attributes, which caught an unusual NFS client setting the size and group at the same time. To handle this issue properly this splits the notify_change call in nfsd_setattr into two separate ones. Signed-off-by: Christoph Hellwig <hch@lst.de> Tested-by: Chuck Lever <chuck.lever@oracle.com> Signed-off-by: J. Bruce Fields <bfields@redhat.com> Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Diffstat (limited to 'fs/bfs')
0 files changed, 0 insertions, 0 deletions