diff options
author | Nikolay Borisov <nborisov@suse.com> | 2019-03-27 08:24:11 -0400 |
---|---|---|
committer | David Sterba <dsterba@suse.com> | 2019-04-29 13:02:37 -0400 |
commit | 8e75fd893b0608aa3a45f8654b71960423df5f3e (patch) | |
tree | 1b4985f7563cc2a6a1877e03e3178d202342a7a0 /fs/btrfs/volumes.h | |
parent | 4ca7365606ca08282da248fbc270abf58a515e20 (diff) |
btrfs: Stop using call_rcu for device freeing
btrfs_device structs are freed from RCU context since device iteration
is protected by RCU. Currently this is achieved by using call_rcu since
no blocking functions are called within btrfs_free_device. Future
refactoring of pending/pinned chunks will require calling sleeping
functions.
This patch is in preparation for these changes by simply switching from
RCU callbacks to explicit calls of synchronize_rcu and calling
btrfs_free_device directly. This is functionally equivalent, making sure
that there are no readers at that time.
Signed-off-by: Nikolay Borisov <nborisov@suse.com>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'fs/btrfs/volumes.h')
-rw-r--r-- | fs/btrfs/volumes.h | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/fs/btrfs/volumes.h b/fs/btrfs/volumes.h index b9912b910d6d..d3658a4e65db 100644 --- a/fs/btrfs/volumes.h +++ b/fs/btrfs/volumes.h | |||
@@ -118,7 +118,6 @@ struct btrfs_device { | |||
118 | struct scrub_ctx *scrub_ctx; | 118 | struct scrub_ctx *scrub_ctx; |
119 | 119 | ||
120 | struct btrfs_work work; | 120 | struct btrfs_work work; |
121 | struct rcu_head rcu; | ||
122 | 121 | ||
123 | /* readahead state */ | 122 | /* readahead state */ |
124 | atomic_t reada_in_flight; | 123 | atomic_t reada_in_flight; |