From patchwork Tue Oct 19 06:25:26 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christoph Hellwig X-Patchwork-Id: 12568693 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 3C4B6C433EF for ; Tue, 19 Oct 2021 06:25:51 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 25B7660230 for ; Tue, 19 Oct 2021 06:25:51 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229527AbhJSG2C (ORCPT ); Tue, 19 Oct 2021 02:28:02 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37778 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234220AbhJSG2B (ORCPT ); Tue, 19 Oct 2021 02:28:01 -0400 Received: from bombadil.infradead.org (unknown [IPv6:2607:7c80:54:e::133]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3702CC061749; Mon, 18 Oct 2021 23:25:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=Content-Transfer-Encoding: MIME-Version:References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Sender :Reply-To:Content-Type:Content-ID:Content-Description; bh=S4CUuCzH5lqDJB4MuGXgQVUVRBAgyFaG9eQzfRY3vKs=; b=Y76U8j2/7fMjSInt7+CXGBDOhc CZY3kWorzZ2XPyjb2tyz44lq9E/ZVzRaAEAwhRHsFtJoldrC1Bz7ygkgOAP4PjegThAdcN59PVRnx EoqzxNHR8HF2r+3LHKmbkqPU3gX98CERX8a9xovUUHNUdCqzg/SaZ8TWDCI9dpEkH99+mUQYHjlvH OU4uFyZ0MFPNFVBHys6c+5ihObcQ9kr4ugeCnSkXlolmvravRiugyya4H7qIvrhXaNUnEmvdXsK2i FYUBNrrNufIVcV83q4hcD3MKW8wZif2UlfwLDuf96LNy8crV7wf6vsX/d7s75O4gXzmCvHTEGC2MF 3/pQctLQ==; Received: from 089144192247.atnat0001.highway.a1.net ([89.144.192.247] helo=localhost) by bombadil.infradead.org with esmtpsa (Exim 4.94.2 #2 (Red Hat Linux)) id 1mciZE-000HYS-Kb; Tue, 19 Oct 2021 06:25:45 +0000 From: Christoph Hellwig To: Jens Axboe Cc: =?utf-8?q?Roger_Pau_Monn=C3=A9?= , Josef Bacik , David Sterba , OGAWA Hirofumi , Konstantin Komarov , linux-block@vger.kernel.org, xen-devel@lists.xenproject.org, linux-btrfs@vger.kernel.org, linux-fsdevel@vger.kernel.org, ntfs3@lists.linux.dev Subject: [PATCH 3/7] xen-blkback: use sync_blockdev Date: Tue, 19 Oct 2021 08:25:26 +0200 Message-Id: <20211019062530.2174626-4-hch@lst.de> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20211019062530.2174626-1-hch@lst.de> References: <20211019062530.2174626-1-hch@lst.de> MIME-Version: 1.0 X-SRS-Rewrite: SMTP reverse-path rewritten from by bombadil.infradead.org. See http://www.infradead.org/rpr.html Precedence: bulk List-ID: X-Mailing-List: linux-fsdevel@vger.kernel.org Use sync_blockdev instead of opencoding it. Signed-off-by: Christoph Hellwig Reviewed-by: Chaitanya Kulkarni --- drivers/block/xen-blkback/xenbus.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/block/xen-blkback/xenbus.c b/drivers/block/xen-blkback/xenbus.c index 33eba3df4dd9a..914587aabca0c 100644 --- a/drivers/block/xen-blkback/xenbus.c +++ b/drivers/block/xen-blkback/xenbus.c @@ -98,7 +98,7 @@ static void xen_update_blkif_status(struct xen_blkif *blkif) return; } - err = filemap_write_and_wait(blkif->vbd.bdev->bd_inode->i_mapping); + err = sync_blockdev(blkif->vbd.bdev); if (err) { xenbus_dev_error(blkif->be->dev, err, "block flush"); return;