aboutsummaryrefslogtreecommitdiffstats
path: root/block/blk-barrier.c
diff options
context:
space:
mode:
Diffstat (limited to 'block/blk-barrier.c')
-rw-r--r--block/blk-barrier.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/block/blk-barrier.c b/block/blk-barrier.c
index 0d710c9d403b..74e404393172 100644
--- a/block/blk-barrier.c
+++ b/block/blk-barrier.c
@@ -79,7 +79,7 @@ unsigned blk_ordered_req_seq(struct request *rq)
79 * 79 *
80 * http://thread.gmane.org/gmane.linux.kernel/537473 80 * http://thread.gmane.org/gmane.linux.kernel/537473
81 */ 81 */
82 if (!blk_fs_request(rq)) 82 if (rq->cmd_type != REQ_TYPE_FS)
83 return QUEUE_ORDSEQ_DRAIN; 83 return QUEUE_ORDSEQ_DRAIN;
84 84
85 if ((rq->cmd_flags & REQ_ORDERED_COLOR) == 85 if ((rq->cmd_flags & REQ_ORDERED_COLOR) ==
@@ -236,7 +236,8 @@ static inline bool start_ordered(struct request_queue *q, struct request **rqp)
236bool blk_do_ordered(struct request_queue *q, struct request **rqp) 236bool blk_do_ordered(struct request_queue *q, struct request **rqp)
237{ 237{
238 struct request *rq = *rqp; 238 struct request *rq = *rqp;
239 const int is_barrier = blk_fs_request(rq) && blk_barrier_rq(rq); 239 const int is_barrier = rq->cmd_type == REQ_TYPE_FS &&
240 (rq->cmd_flags & REQ_HARDBARRIER);
240 241
241 if (!q->ordseq) { 242 if (!q->ordseq) {
242 if (!is_barrier) 243 if (!is_barrier)
@@ -261,7 +262,7 @@ bool blk_do_ordered(struct request_queue *q, struct request **rqp)
261 */ 262 */
262 263
263 /* Special requests are not subject to ordering rules. */ 264 /* Special requests are not subject to ordering rules. */
264 if (!blk_fs_request(rq) && 265 if (rq->cmd_type != REQ_TYPE_FS &&
265 rq != &q->pre_flush_rq && rq != &q->post_flush_rq) 266 rq != &q->pre_flush_rq && rq != &q->post_flush_rq)
266 return true; 267 return true;
267 268