From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from bombadil.infradead.org ([198.137.202.133]:59812 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2390794AbgDNH3f (ORCPT ); Tue, 14 Apr 2020 03:29:35 -0400 From: Christoph Hellwig Subject: [PATCH 08/10] block: simplify block device syncing in bdev_del_partition Date: Tue, 14 Apr 2020 09:29:00 +0200 Message-Id: <20200414072902.324936-9-hch@lst.de> In-Reply-To: <20200414072902.324936-1-hch@lst.de> References: <20200414072902.324936-1-hch@lst.de> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-s390-owner@vger.kernel.org List-ID: To: Jens Axboe Cc: Stefan Haberland , Jan Hoeppner , linux-block@vger.kernel.org, linux-s390@vger.kernel.org, Johannes Thumshirn 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 Reviewed-by: Johannes Thumshirn --- block/partitions/core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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); -- 2.25.1