]> www.infradead.org Git - users/dwmw2/linux.git/commit
btrfs: fix lockdep warnings on io_uring encoded reads
authorMark Harmstone <maharmstone@fb.com>
Fri, 15 Nov 2024 15:49:17 +0000 (15:49 +0000)
committerDavid Sterba <dsterba@suse.com>
Fri, 29 Nov 2024 15:56:38 +0000 (16:56 +0100)
commit22d2e48e318564f8c9b09faf03ecb4f03fb44dd5
tree1aa36fc02534dfae195851377a340f5fe993129f
parent7c4e39f9d2af4abaf82ca0e315d1fd340456620f
btrfs: fix lockdep warnings on io_uring encoded reads

Lockdep doesn't like the fact that btrfs_uring_read_extent() returns to
userspace still holding the inode lock, even though we release it once
the I/O finishes. Add calls to rwsem_release() and rwsem_acquire_read() to
work round this.

Reported-by: Johannes Thumshirn <johannes.thumshirn@wdc.com>
34310c442e17 ("btrfs: add io_uring command for encoded reads (ENCODED_READ ioctl)")
Signed-off-by: Mark Harmstone <maharmstone@fb.com>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/ioctl.c
fs/btrfs/locking.h