diff options
author | Christoph Hellwig <hch@lst.de> | 2017-01-24 09:22:41 +0100 |
---|---|---|
committer | J. Bruce Fields <bfields@redhat.com> | 2017-01-31 12:29:24 -0500 |
commit | 41f53350a0f36a7b8e31bec0d0ca907e028ab4cd (patch) | |
tree | 086931a2815c160d45576b05254ded0aa8c2cbf4 /sound/soc/samsung/i2s.c | |
parent | d19fb70dd68c4e960e2ac09b0b9c79dfdeefa726 (diff) |
nfsd: special case truncates some more
Both the NFS protocols and the Linux VFS use a setattr operation with a
bitmap of attributs to set to set various file attributes including the
file size and the uid/gid.
The Linux syscalls never mixes size updates with unrelated updates like
the uid/gid, and some file systems like XFS and GFS2 rely on the fact
that truncates might not update random other attributes, and many other
file systems handle the case but do not update the different 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 switches nfsd to call vfs_truncate
for size changes, and then handle all other attributes through
notify_change. As a side effect this also means less boilerplace code
around the size change as we can now reuse the VFS code.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: J. Bruce Fields <bfields@redhat.com>
Diffstat (limited to 'sound/soc/samsung/i2s.c')
0 files changed, 0 insertions, 0 deletions