mirror of
https://github.com/Fishwaldo/linux-bl808.git
synced 2025-06-17 20:25:19 +00:00
btrfs: scrub: convert scrub_workers_refcnt to refcount_t
Use the refcount_t for fs_info::scrub_workers_refcnt instead of int so we get the extra checks. All reference changes are still done under scrub_lock. Signed-off-by: Anand Jain <anand.jain@oracle.com> Reviewed-by: David Sterba <dsterba@suse.com> Signed-off-by: David Sterba <dsterba@suse.com>
This commit is contained in:
parent
eb4318e59a
commit
ff09c4ca59
3 changed files with 8 additions and 5 deletions
|
@ -2109,7 +2109,7 @@ static void btrfs_init_scrub(struct btrfs_fs_info *fs_info)
|
|||
atomic_set(&fs_info->scrubs_paused, 0);
|
||||
atomic_set(&fs_info->scrub_cancel_req, 0);
|
||||
init_waitqueue_head(&fs_info->scrub_pause_wait);
|
||||
fs_info->scrub_workers_refcnt = 0;
|
||||
refcount_set(&fs_info->scrub_workers_refcnt, 0);
|
||||
}
|
||||
|
||||
static void btrfs_init_balance(struct btrfs_fs_info *fs_info)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue