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)
committerDavid Sterba <dsterba@suse.com>
Mon, 28 Feb 2022 15:19:48 +0000 (16:19 +0100)
commit7b0fb68684dc228a4e0ebade3d60b8625b258cc5
tree550d59114ef8ac0f08d8c8acfe1f2dadbae650aa
parent1ab271e1adfad65030364cd6c8c0387972c4f45b
btrfs: move QUOTA_ENABLED check to rescan_should_stop from btrfs_qgroup_rescan_worker

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>
fs/btrfs/qgroup.c