diff mbox series

[-next] btrfs: remove set but not used variable 'fs_devices'

Message ID 20190327032024.63906-1-yuehaibing@huawei.com (mailing list archive)
State New, archived
Headers show
Series [-next] btrfs: remove set but not used variable 'fs_devices' | expand

Commit Message

Yue Haibing March 27, 2019, 3:20 a.m. UTC
Fixes gcc '-Wunused-but-set-variable' warning:

fs/btrfs/volumes.c: In function 'btrfs_grow_device':
fs/btrfs/volumes.c:2824:27: warning:
 variable 'fs_devices' set but not used [-Wunused-but-set-variable]

It's not used after 6f32a50a232b ("btrfs: combine device update operations
during transaction commit")

Signed-off-by: YueHaibing <yuehaibing@huawei.com>
---
 fs/btrfs/volumes.c | 3 ---
 1 file changed, 3 deletions(-)

Comments

David Sterba March 28, 2019, 2:27 p.m. UTC | #1
On Wed, Mar 27, 2019 at 03:20:24AM +0000, YueHaibing wrote:
> Fixes gcc '-Wunused-but-set-variable' warning:
> 
> fs/btrfs/volumes.c: In function 'btrfs_grow_device':
> fs/btrfs/volumes.c:2824:27: warning:
>  variable 'fs_devices' set but not used [-Wunused-but-set-variable]
> 
> It's not used after 6f32a50a232b ("btrfs: combine device update operations
> during transaction commit")

Thanks, there's another iteration of the patchset in the malinglist so
I'll fold the change there.
diff mbox series

Patch

diff --git a/fs/btrfs/volumes.c b/fs/btrfs/volumes.c
index afafc92e70e9..605230482009 100644
--- a/fs/btrfs/volumes.c
+++ b/fs/btrfs/volumes.c
@@ -2821,7 +2821,6 @@  int btrfs_grow_device(struct btrfs_trans_handle *trans,
 {
 	struct btrfs_fs_info *fs_info = device->fs_info;
 	struct btrfs_super_block *super_copy = fs_info->super_copy;
-	struct btrfs_fs_devices *fs_devices;
 	u64 old_total;
 	u64 diff;
 
@@ -2840,8 +2839,6 @@  int btrfs_grow_device(struct btrfs_trans_handle *trans,
 		return -EINVAL;
 	}
 
-	fs_devices = fs_info->fs_devices;
-
 	btrfs_set_super_total_bytes(super_copy,
 			round_down(old_total + diff, fs_info->sectorsize));
 	device->fs_devices->total_rw_bytes += diff;