summaryrefslogtreecommitdiffstats
path: root/fs/btrfs/ctree.h
diff options
context:
space:
mode:
authorDavid Sterba2018-04-05 01:04:49 +0200
committerDavid Sterba2018-10-15 17:23:38 +0200
commit7f8d236ae132a8886a0186008c828e21f7460474 (patch)
tree63bf1e2dd346ebefa152cc911919eb9f47254e33 /fs/btrfs/ctree.h
parentbtrfs: dev-replace: avoid useless lock on error handling path (diff)
downloadkernel-qcow2-linux-7f8d236ae132a8886a0186008c828e21f7460474.tar.gz
kernel-qcow2-linux-7f8d236ae132a8886a0186008c828e21f7460474.tar.xz
kernel-qcow2-linux-7f8d236ae132a8886a0186008c828e21f7460474.zip
btrfs: dev-replace: move replace members out of fs_info
The replace_wait and bio_counter were mistakenly added to fs_info in commit c404e0dc2c843b154f ("Btrfs: fix use-after-free in the finishing procedure of the device replace"), but they logically belong to fs_info::dev_replace. Besides, bio_counter is a very generic name and is confusing in bare fs_info context. Reviewed-by: Anand Jain <anand.jain@oracle.com> Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'fs/btrfs/ctree.h')
-rw-r--r--fs/btrfs/ctree.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/fs/btrfs/ctree.h b/fs/btrfs/ctree.h
index daa273c7e150..e8244c0b0597 100644
--- a/fs/btrfs/ctree.h
+++ b/fs/btrfs/ctree.h
@@ -365,6 +365,9 @@ struct btrfs_dev_replace {
wait_queue_head_t read_lock_wq;
struct btrfs_scrub_progress scrub_progress;
+
+ struct percpu_counter bio_counter;
+ wait_queue_head_t replace_wait;
};
/* For raid type sysfs entries */
@@ -1087,9 +1090,6 @@ struct btrfs_fs_info {
/* device replace state */
struct btrfs_dev_replace dev_replace;
- struct percpu_counter bio_counter;
- wait_queue_head_t replace_wait;
-
struct semaphore uuid_tree_rescan_sem;
/* Used to reclaim the metadata space in the background. */