]> git.baikalelectronics.ru Git - kernel.git/commit
btrfs: use cond_resched_rwlock_write() during inode eviction
authorFilipe Manana <fdmanana@suse.com>
Mon, 19 Sep 2022 14:06:31 +0000 (15:06 +0100)
committerDavid Sterba <dsterba@suse.com>
Thu, 29 Sep 2022 15:08:30 +0000 (17:08 +0200)
commit0f48c6bf2bd0cd08fa4f5acac225a1e97ff677ff
tree48f8cc0d641eae20859556fe7262041295394616
parent7b3ab28c2ae68fa72f242f5964b8d08f3c17fd52
btrfs: use cond_resched_rwlock_write() during inode eviction

At evict_inode_truncate_pages(), instead of manually checking if
rescheduling is needed, then unlock the extent map tree, reschedule and
then write lock again the tree, use the helper cond_resched_rwlock_write()
which does all that.

Signed-off-by: Filipe Manana <fdmanana@suse.com>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/inode.c