From: Christian Brauner Date: Tue, 4 Nov 2025 12:12:35 +0000 (+0100) Subject: btrfs: use super write guard in relocating_repair_kthread() X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=b7b8aca68e2e857ec16fe67ed6e1d8b3eafc2653;p=thirdparty%2Flinux.git btrfs: use super write guard in relocating_repair_kthread() Link: https://patch.msgid.link/20251104-work-guards-v1-6-5108ac78a171@kernel.org Signed-off-by: Christian Brauner --- diff --git a/fs/btrfs/volumes.c b/fs/btrfs/volumes.c index e3788798528dc..88065e52184c3 100644 --- a/fs/btrfs/volumes.c +++ b/fs/btrfs/volumes.c @@ -8177,12 +8177,12 @@ static int relocating_repair_kthread(void *data) target = cache->start; btrfs_put_block_group(cache); - sb_start_write(fs_info->sb); + guard(super_write)(fs_info->sb); + if (!btrfs_exclop_start(fs_info, BTRFS_EXCLOP_BALANCE)) { btrfs_info(fs_info, "zoned: skip relocating block group %llu to repair: EBUSY", target); - sb_end_write(fs_info->sb); return -EBUSY; } @@ -8210,7 +8210,6 @@ out: btrfs_put_block_group(cache); mutex_unlock(&fs_info->reclaim_bgs_lock); btrfs_exclop_finish(fs_info); - sb_end_write(fs_info->sb); return ret; }