From: Christoph Hellwig Date: Tue, 19 Oct 2021 06:25:26 +0000 (+0200) Subject: xen-blkback: use sync_blockdev X-Git-Tag: v5.16-rc1~208^2~4 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=d39b0a2fae366793e707bbd576eea055b7e9db9f;p=thirdparty%2Flinux.git xen-blkback: use sync_blockdev Use sync_blockdev instead of opencoding it. Signed-off-by: Christoph Hellwig Reviewed-by: Chaitanya Kulkarni Link: https://lore.kernel.org/r/20211019062530.2174626-4-hch@lst.de Signed-off-by: Jens Axboe --- 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;