aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mmc/card/block.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/mmc/card/block.c')
-rw-r--r--drivers/mmc/card/block.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/drivers/mmc/card/block.c b/drivers/mmc/card/block.c
index 370472797fff..c0cb225bbb47 100644
--- a/drivers/mmc/card/block.c
+++ b/drivers/mmc/card/block.c
@@ -851,16 +851,18 @@ out:
851static int mmc_blk_issue_flush(struct mmc_queue *mq, struct request *req) 851static int mmc_blk_issue_flush(struct mmc_queue *mq, struct request *req)
852{ 852{
853 struct mmc_blk_data *md = mq->data; 853 struct mmc_blk_data *md = mq->data;
854 struct mmc_card *card = md->queue.card;
855 int ret = 0;
856
857 ret = mmc_flush_cache(card);
858 if (ret)
859 ret = -EIO;
854 860
855 /*
856 * No-op, only service this because we need REQ_FUA for reliable
857 * writes.
858 */
859 spin_lock_irq(&md->lock); 861 spin_lock_irq(&md->lock);
860 __blk_end_request_all(req, 0); 862 __blk_end_request_all(req, ret);
861 spin_unlock_irq(&md->lock); 863 spin_unlock_irq(&md->lock);
862 864
863 return 1; 865 return ret ? 0 : 1;
864} 866}
865 867
866/* 868/*