@@ -53,11 +53,16 @@ const char *blk_zone_cond_str(enum blk_zone_cond zone_cond)
EXPORT_SYMBOL_GPL(blk_zone_cond_str);
/*
- * Return true if a request is a write requests that needs zone write locking.
+ * Return true if a request is a write request that needs zone write locking.
*/
bool blk_req_needs_zone_write_lock(struct request *rq)
{
- if (!rq->q->disk->seq_zones_wlock)
+ struct request_queue *q = rq->q;
+
+ if (!q->limits.use_zone_write_lock)
+ return false;
+
+ if (!q->disk->seq_zones_wlock)
return false;
return blk_rq_is_seq_zoned_write(rq);