Skip to content

Commit d5f3178

Browse files
Christoph Hellwigaxboe
authored andcommitted
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>
1 parent e669c1d commit d5f3178

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎block/partitions/core.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -531,7 +531,7 @@ int bdev_del_partition(struct block_device *bdev, int partno)
531531
if (bdevp->bd_openers)
532532
goto out_unlock;
533533

534-
fsync_bdev(bdevp);
534+
sync_blockdev(bdevp);
535535
invalidate_bdev(bdevp);
536536

537537
mutex_lock_nested(&bdev->bd_mutex, 1);

0 commit comments

Comments
 (0)