From 2d9d230089d0a5088bb3b37b01dfddc6527740a6 Mon Sep 17 00:00:00 2001 From: Sascha Hauer Date: Fri, 4 Jul 2014 09:07:24 +0200 Subject: block: Add flush callback Some block devices need an explicit callback for flushing written blocks. Add this callback. Signed-off-by: Sascha Hauer --- common/block.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'common') diff --git a/common/block.c b/common/block.c index e522ee425a..0edc8619ef 100644 --- a/common/block.c +++ b/common/block.c @@ -55,6 +55,9 @@ static int writebuffer_flush(struct block_device *blk) } } + if (blk->ops->flush) + return blk->ops->flush(blk); + return 0; } -- cgit v1.2.3