From: Nikolay Borisov Date: Wed, 22 Jul 2020 08:09:25 +0000 (+0300) Subject: btrfs: don't opencode sync_blockdev in btrfs_init_new_device X-Git-Tag: v5.10.7~1090^2~123 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=b9ba017fb0771f67903d70f57908899d7b0020b1;p=platform%2Fkernel%2Flinux-rpi.git btrfs: don't opencode sync_blockdev in btrfs_init_new_device Instead of opencoding filemap_write_and_wait simply call syncblockdev as it makes it abundantly clear what's going on and why this is used. No semantics changes. Reviewed-by: Johannes Thumshirn Reviewed-by: Anand Jain Signed-off-by: Nikolay Borisov Reviewed-by: David Sterba Signed-off-by: David Sterba --- diff --git a/fs/btrfs/volumes.c b/fs/btrfs/volumes.c index 9355f5c78c15..9d169cba8514 100644 --- a/fs/btrfs/volumes.c +++ b/fs/btrfs/volumes.c @@ -2512,7 +2512,7 @@ int btrfs_init_new_device(struct btrfs_fs_info *fs_info, const char *device_path locked = true; } - filemap_write_and_wait(bdev->bd_inode->i_mapping); + sync_blockdev(bdev); rcu_read_lock(); list_for_each_entry_rcu(device, &fs_devices->devices, dev_list) {