diff options
-rw-r--r-- | block/blk-core.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/block/blk-core.c b/block/blk-core.c index 59b5c00c0126..64e96ee1d6af 100644 --- a/block/blk-core.c +++ b/block/blk-core.c @@ -2702,7 +2702,10 @@ static void flush_plug_list(struct blk_plug *plug) /* * rq is already accounted, so use raw insert */ - __elv_add_request(q, rq, ELEVATOR_INSERT_SORT_MERGE); + if (rq->cmd_flags & (REQ_FLUSH | REQ_FUA)) + __elv_add_request(q, rq, ELEVATOR_INSERT_FLUSH); + else + __elv_add_request(q, rq, ELEVATOR_INSERT_SORT_MERGE); } if (q) { |