summaryrefslogtreecommitdiff
path: root/fs/btrfs/file.c
diff options
context:
space:
mode:
authorDarrick J. Wong <djwong@kernel.org>2022-03-10 13:14:38 -0800
committerDarrick J. Wong <djwong@kernel.org>2022-04-18 20:59:42 -0700
commitad7bbbb030119f5b7866430e8f58e7ffb97185a3 (patch)
treeec175e2454f35fc4fdc2bf879adac7786ba3111b /fs/btrfs/file.c
parent314e1ca58706f1d1069bc3577e0e37c931bc1378 (diff)
ext4: fix fallocate to use file_modified to update permissions consistently
Since the initial introduction of (posix) fallocate back at the turn of the century, it has been possible to use this syscall to change the user-visible contents of files. This can happen by extending the file size during a preallocation, or through any of the newer modes (punch, zero, collapse, insert range). Because the call can be used to change file contents, we should treat it like we do any other modification to a file -- update the mtime, and drop set[ug]id privileges/capabilities. The VFS function file_modified() does all this for us if pass it a locked inode, so let's make fallocate drop permissions correctly. Signed-off-by: Darrick J. Wong <djwong@kernel.org>
Diffstat (limited to 'fs/btrfs/file.c')
0 files changed, 0 insertions, 0 deletions