diff options
-rw-r--r-- | fs/btrfs/volumes.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/fs/btrfs/volumes.c b/fs/btrfs/volumes.c index 8482396056ee..e9676a424309 100644 --- a/fs/btrfs/volumes.c +++ b/fs/btrfs/volumes.c | |||
@@ -2108,7 +2108,7 @@ int btrfs_init_new_device(struct btrfs_root *root, char *device_path) | |||
2108 | struct list_head *devices; | 2108 | struct list_head *devices; |
2109 | struct super_block *sb = root->fs_info->sb; | 2109 | struct super_block *sb = root->fs_info->sb; |
2110 | struct rcu_string *name; | 2110 | struct rcu_string *name; |
2111 | u64 total_bytes; | 2111 | u64 tmp; |
2112 | int seeding_dev = 0; | 2112 | int seeding_dev = 0; |
2113 | int ret = 0; | 2113 | int ret = 0; |
2114 | 2114 | ||
@@ -2211,13 +2211,13 @@ int btrfs_init_new_device(struct btrfs_root *root, char *device_path) | |||
2211 | if (!blk_queue_nonrot(bdev_get_queue(bdev))) | 2211 | if (!blk_queue_nonrot(bdev_get_queue(bdev))) |
2212 | root->fs_info->fs_devices->rotating = 1; | 2212 | root->fs_info->fs_devices->rotating = 1; |
2213 | 2213 | ||
2214 | total_bytes = btrfs_super_total_bytes(root->fs_info->super_copy); | 2214 | tmp = btrfs_super_total_bytes(root->fs_info->super_copy); |
2215 | btrfs_set_super_total_bytes(root->fs_info->super_copy, | 2215 | btrfs_set_super_total_bytes(root->fs_info->super_copy, |
2216 | total_bytes + device->total_bytes); | 2216 | tmp + device->total_bytes); |
2217 | 2217 | ||
2218 | total_bytes = btrfs_super_num_devices(root->fs_info->super_copy); | 2218 | tmp = btrfs_super_num_devices(root->fs_info->super_copy); |
2219 | btrfs_set_super_num_devices(root->fs_info->super_copy, | 2219 | btrfs_set_super_num_devices(root->fs_info->super_copy, |
2220 | total_bytes + 1); | 2220 | tmp + 1); |
2221 | 2221 | ||
2222 | /* add sysfs device entry */ | 2222 | /* add sysfs device entry */ |
2223 | btrfs_kobj_add_device(root->fs_info, device); | 2223 | btrfs_kobj_add_device(root->fs_info, device); |