]> git.proxmox.com Git - mirror_ubuntu-jammy-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)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Wed, 14 Dec 2022 13:00:32 +0000 (14:00 +0100)
commit62855d14d53e3be22949ad6eee51c391b31b0e5e
treecfe68a72bf6395d856c03e45b587dc2e58454dd3
parent1510817155f6b09730a97749ad1d076fdf393485
btrfs: move QUOTA_ENABLED check to rescan_should_stop from btrfs_qgroup_rescan_worker

[ Upstream commit db5df254120004471e1c957957ab2f1e612dcbd6 ]

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>
(cherry picked from commit da86809ab822f5aef6764e146ae667898dc02469)
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
fs/btrfs/qgroup.c