Skip to contentSkip to conversation

block: Reenforce consistent queue_flags handling

PATCH New Elias Oltmanns 1 participant 1 message Apr 30, 2008 Block layer

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 block: Reenforce consistent queue_flags handling

Just make the tree comply with the rules introduced in commit 75ad23bc0fcb4f992a5d06982bf0857ab1738e9e.

---

 block/blk-core.c  |    2 +-
 block/blk-sysfs.c |    4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)
block/blk-core.c +1 -1
index 5d09f8c..17ba427 100644
@@ -201,7 +201,7 @@ void blk_plug_device(struct request_queue *q)
 		return;
 
 	if (!test_bit(QUEUE_FLAG_PLUGGED, &q->queue_flags)) {
-		__set_bit(QUEUE_FLAG_PLUGGED, &q->queue_flags);
+		queue_flag_set(QUEUE_FLAG_PLUGGED, q);
 		mod_timer(&q->unplug_timer, jiffies + q->unplug_delay);
 		blk_add_trace_generic(q, NULL, 0, BLK_TA_PLUG);
 	}
block/blk-sysfs.c +2 -2
index e85c401..775e736 100644
@@ -147,9 +147,9 @@ static ssize_t queue_nomerges_store(struct request_queue *q, const char *page,
 	ssize_t ret = queue_var_store(&nm, page, count);
 
 	if (nm)
-	       set_bit(QUEUE_FLAG_NOMERGES, &q->queue_flags);
+		queue_flag_set_unlocked(QUEUE_FLAG_NOMERGES, q);
 	else
-	       clear_bit(QUEUE_FLAG_NOMERGES, &q->queue_flags);
+		queue_flag_clear_unlocked(QUEUE_FLAG_NOMERGES, q);
 
 	return ret;
 }