diff options
author | David Sterba <dsterba@suse.com> | 2018-07-20 10:30:20 -0400 |
---|---|---|
committer | David Sterba <dsterba@suse.com> | 2018-08-06 07:12:58 -0400 |
commit | e9539cff04728e31e150b41000b828745fc0c2b3 (patch) | |
tree | 53769b86fa786f09c3ae0bab503278360daa1b87 | |
parent | e17385ca2960177da402d6f4d80bdc5b53c29bc4 (diff) |
btrfs: dev-replace: remove unused members of btrfs_dev_replace
Lock owner and nesting level have been unused since day 1, probably
copy&pasted from the extent_buffer locking scheme without much thinking.
The locking of device replace is simpler and does not need any lock
nesting.
Signed-off-by: David Sterba <dsterba@suse.com>
-rw-r--r-- | fs/btrfs/ctree.h | 2 | ||||
-rw-r--r-- | fs/btrfs/disk-io.c | 2 |
2 files changed, 0 insertions, 4 deletions
diff --git a/fs/btrfs/ctree.h b/fs/btrfs/ctree.h index 4ca6c4e141ea..5f6ec80d374f 100644 --- a/fs/btrfs/ctree.h +++ b/fs/btrfs/ctree.h | |||
@@ -365,8 +365,6 @@ struct btrfs_dev_replace { | |||
365 | struct btrfs_device *srcdev; | 365 | struct btrfs_device *srcdev; |
366 | struct btrfs_device *tgtdev; | 366 | struct btrfs_device *tgtdev; |
367 | 367 | ||
368 | pid_t lock_owner; | ||
369 | atomic_t nesting_level; | ||
370 | struct mutex lock_finishing_cancel_unmount; | 368 | struct mutex lock_finishing_cancel_unmount; |
371 | rwlock_t lock; | 369 | rwlock_t lock; |
372 | atomic_t read_locks; | 370 | atomic_t read_locks; |
diff --git a/fs/btrfs/disk-io.c b/fs/btrfs/disk-io.c index 3830867e0225..c1d287a766c1 100644 --- a/fs/btrfs/disk-io.c +++ b/fs/btrfs/disk-io.c | |||
@@ -2154,8 +2154,6 @@ static void btrfs_init_btree_inode(struct btrfs_fs_info *fs_info) | |||
2154 | 2154 | ||
2155 | static void btrfs_init_dev_replace_locks(struct btrfs_fs_info *fs_info) | 2155 | static void btrfs_init_dev_replace_locks(struct btrfs_fs_info *fs_info) |
2156 | { | 2156 | { |
2157 | fs_info->dev_replace.lock_owner = 0; | ||
2158 | atomic_set(&fs_info->dev_replace.nesting_level, 0); | ||
2159 | mutex_init(&fs_info->dev_replace.lock_finishing_cancel_unmount); | 2157 | mutex_init(&fs_info->dev_replace.lock_finishing_cancel_unmount); |
2160 | rwlock_init(&fs_info->dev_replace.lock); | 2158 | rwlock_init(&fs_info->dev_replace.lock); |
2161 | atomic_set(&fs_info->dev_replace.read_locks, 0); | 2159 | atomic_set(&fs_info->dev_replace.read_locks, 0); |