提交 d5f3178e 编写于 作者: C Christoph Hellwig 提交者: Jens Axboe

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: NChristoph Hellwig <hch@lst.de>
Reviewed-by: NJohannes Thumshirn <johannes.thumshirn@wdc.com>
Signed-off-by: NJens Axboe <axboe@kernel.dk>
上级 e669c1da
...@@ -531,7 +531,7 @@ int bdev_del_partition(struct block_device *bdev, int partno) ...@@ -531,7 +531,7 @@ int bdev_del_partition(struct block_device *bdev, int partno)
if (bdevp->bd_openers) if (bdevp->bd_openers)
goto out_unlock; goto out_unlock;
fsync_bdev(bdevp); sync_blockdev(bdevp);
invalidate_bdev(bdevp); invalidate_bdev(bdevp);
mutex_lock_nested(&bdev->bd_mutex, 1); mutex_lock_nested(&bdev->bd_mutex, 1);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册