diff options
author | Anand Jain <anand.jain@oracle.com> | 2019-01-30 14:45:02 +0800 |
---|---|---|
committer | David Sterba <dsterba@suse.com> | 2019-02-25 14:13:38 +0100 |
commit | ff09c4ca5992b839b4e8b411f55aecd75735fc16 (patch) | |
tree | a12824b74e38668c1d81e85eb1cfa64b19f13f40 /fs/btrfs/ctree.h | |
parent | eb4318e59a0d5caa636662225afeea9796b27092 (diff) | |
download | lwn-ff09c4ca5992b839b4e8b411f55aecd75735fc16.tar.gz lwn-ff09c4ca5992b839b4e8b411f55aecd75735fc16.zip |
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>
Diffstat (limited to 'fs/btrfs/ctree.h')
-rw-r--r-- | fs/btrfs/ctree.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/btrfs/ctree.h b/fs/btrfs/ctree.h index 9306925b6790..7efa1edb30cd 100644 --- a/fs/btrfs/ctree.h +++ b/fs/btrfs/ctree.h @@ -1075,7 +1075,7 @@ struct btrfs_fs_info { atomic_t scrubs_paused; atomic_t scrub_cancel_req; wait_queue_head_t scrub_pause_wait; - int scrub_workers_refcnt; + refcount_t scrub_workers_refcnt; struct btrfs_workqueue *scrub_workers; struct btrfs_workqueue *scrub_wr_completion_workers; struct btrfs_workqueue *scrub_nocow_workers; |