summaryrefslogtreecommitdiff
path: root/block/blk-crypto-profile.c
diff options
context:
space:
mode:
authorDarrick J. Wong <djwong@kernel.org>2022-03-10 13:14:39 -0800
committerDarrick J. Wong <djwong@kernel.org>2022-04-18 20:59:42 -0700
commitc4b17d9e421047d1eebb7db78c913fad34b0f55c (patch)
treeb057ff0408ebac7ac6c05e6cae272e87ac7ed731 /block/blk-crypto-profile.c
parentad7bbbb030119f5b7866430e8f58e7ffb97185a3 (diff)
btrfs: fix fallocate to use file_modified to update permissions consistentlyfalloc-permissions-fixes-5.18_2022-04-18
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 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 'block/blk-crypto-profile.c')
0 files changed, 0 insertions, 0 deletions