block: simplify block device syncing in bdev_del_partition

We just checked a little above that the block device for the partition
im busy.  That implies no file system is mounted, and thus the only
thing in fsync_bdev that actually is used is sync_blockdev.  Just call
sync_blockdev directly.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Johannes Thumshirn <johannes.thumshirn@wdc.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
This commit is contained in:
Christoph Hellwig 2020-04-14 09:29:00 +02:00 коммит произвёл Jens Axboe
Родитель e669c1da03
Коммит d5f3178ec9
1 изменённых файлов: 1 добавлений и 1 удалений

Просмотреть файл

@ -531,7 +531,7 @@ int bdev_del_partition(struct block_device *bdev, int partno)
if (bdevp->bd_openers)
goto out_unlock;
fsync_bdev(bdevp);
sync_blockdev(bdevp);
invalidate_bdev(bdevp);
mutex_lock_nested(&bdev->bd_mutex, 1);