summaryrefslogtreecommitdiff
path: root/fs/btrfs/extent_io.c
diff options
context:
space:
mode:
authorBernd Schubert <bschubert@ddn.com>2023-09-06 18:59:03 +0300
committerDavid Sterba <dsterba@suse.com>2023-09-13 19:41:03 +0300
commit9af86694fd5d387992699ec99007ed374966ce9a (patch)
tree4ce62de59e4fd9344ad6bfae2d7fa99101b20c92 /fs/btrfs/extent_io.c
parent06ed09351b67eb1114ae106a87a0ee3ea9adb3db (diff)
downloadlinux-9af86694fd5d387992699ec99007ed374966ce9a.tar.xz
btrfs: file_remove_privs needs an exclusive lock in direct io write
This was noticed by Miklos that file_remove_privs might call into notify_change(), which requires to hold an exclusive lock. The problem exists in FUSE and btrfs. We can fix it without any additional helpers from VFS, in case the privileges would need to be dropped, change the lock type to be exclusive and redo the loop. Fixes: e9adabb9712e ("btrfs: use shared lock for direct writes within EOF") CC: Miklos Szeredi <miklos@szeredi.hu> CC: stable@vger.kernel.org # 5.15+ Reviewed-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Bernd Schubert <bschubert@ddn.com> Reviewed-by: David Sterba <dsterba@suse.com> Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'fs/btrfs/extent_io.c')
0 files changed, 0 insertions, 0 deletions