[PATCH] block: cleanup for blk_cleanup_queue()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



2 small cleanup:
* blk_set_queue_dying(q) has set QUEUE_FLAG_DYING. Remove the redundant
  statement 'blk_queue_flag_set(QUEUE_FLAG_DYING, q)'
* requests queued drained before DEAD marking, not DYING marking.
  Update the comment.

Signed-off-by: Shenghui Wang <shhuiw@xxxxxxxxxxx>
---
 block/blk-core.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/block/blk-core.c b/block/blk-core.c
index 4673ebe42255..177377becfab 100644
--- a/block/blk-core.c
+++ b/block/blk-core.c
@@ -334,11 +334,10 @@ void blk_cleanup_queue(struct request_queue *q)
 
 	blk_queue_flag_set(QUEUE_FLAG_NOMERGES, q);
 	blk_queue_flag_set(QUEUE_FLAG_NOXMERGES, q);
-	blk_queue_flag_set(QUEUE_FLAG_DYING, q);
 	mutex_unlock(&q->sysfs_lock);
 
 	/*
-	 * Drain all requests queued before DYING marking. Set DEAD flag to
+	 * Drain all requests queued before DEAD marking. Set DEAD flag to
 	 * prevent that q->request_fn() gets invoked after draining finished.
 	 */
 	blk_freeze_queue(q);
-- 
2.20.1






[Index of Archives]     [Linux RAID]     [Linux SCSI]     [Linux ATA RAID]     [IDE]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Device Mapper]

  Powered by Linux