diff options
author | Christoph Hellwig <hch@lst.de> | 2020-04-14 09:29:00 +0200 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2020-04-20 11:32:59 -0600 |
commit | d5f3178ec9ab8a3a71763310d260e1d2a047baf1 (patch) | |
tree | 1f730b33e00132280e1c4e92572211e8b57db510 /block/partitions | |
parent | e669c1da03a9dde0e7d43852a5b6ade8312e8701 (diff) | |
download | linux-d5f3178ec9ab8a3a71763310d260e1d2a047baf1.tar.bz2 |
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>
Diffstat (limited to 'block/partitions')
-rw-r--r-- | block/partitions/core.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/block/partitions/core.c b/block/partitions/core.c index a94d296d7aed..c085bf85509b 100644 --- a/block/partitions/core.c +++ b/block/partitions/core.c @@ -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); |