]> git.baikalelectronics.ru Git - kernel.git/commit
btrfs: move QUOTA_ENABLED check to rescan_should_stop from btrfs_qgroup_rescan_worker
authorNikolay Borisov <nborisov@suse.com>
Thu, 13 Jan 2022 15:16:18 +0000 (17:16 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 8 Dec 2022 10:23:02 +0000 (11:23 +0100)
commit9bf18610e5d529e7d93bdde80ba353516e4eb25a
treef9a18a3e98d267ffb5f53dcd390d7c08cd0d6441
parent77e1f9fff612f084d6918894052d423df93fbdb6
btrfs: move QUOTA_ENABLED check to rescan_should_stop from btrfs_qgroup_rescan_worker

[ Upstream commit 97c3516e9aba402dbda07d734f56613a0893554d ]

Instead of having 2 places that short circuit the qgroup leaf scan have
everything in the qgroup_rescan_leaf function. In addition to that, also
ensure that the inconsistent qgroup flag is set when rescan_should_stop
returns true. This both retains the old behavior when -EINTR was set in
the body of the loop and at the same time also extends this behavior
when scanning is interrupted due to remount or unmount operations.

Signed-off-by: Nikolay Borisov <nborisov@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
Stable-dep-of: f7e942b5bb35 ("btrfs: qgroup: fix sleep from invalid context bug in btrfs_qgroup_inherit()")
Signed-off-by: Sasha Levin <sashal@kernel.org>
fs/btrfs/qgroup.c