]> git.baikalelectronics.ru Git - kernel.git/commit
btrfs: Remove redundant assignment of tgt_device->commit_total_bytes
authorNikolay Borisov <nborisov@suse.com>
Tue, 14 May 2019 10:54:45 +0000 (13:54 +0300)
committerDavid Sterba <dsterba@suse.com>
Mon, 1 Jul 2019 11:34:55 +0000 (13:34 +0200)
commit7a10017afed5009f795f3266d1ef85653e4d225b
treecd826f97a53c33f54e8d24bb189de99a08839c21
parent7505b9b1cef5113e961f317f8b0efed4f30d77fb
btrfs: Remove redundant assignment of tgt_device->commit_total_bytes

This is already done in btrfs_init_dev_replace_tgtdev which is the first
phase of device replace, called before doing scrub. During that time
exclusive lock is held. Additionally btrfs_fs_device::commit_total_bytes
is always set based on the size of the underlying block device which
shouldn't change once set. This makes the 2nd assignment of the variable
in the finishing phase redundant.

Reviewed-by: Johannes Thumshirn <jthumshirn@suse.de>
Signed-off-by: Nikolay Borisov <nborisov@suse.com>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/dev-replace.c