aboutsummaryrefslogtreecommitdiffstats
path: root/block
diff options
context:
space:
mode:
Diffstat (limited to 'block')
-rw-r--r--block/blk-mq-tag.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/block/blk-mq-tag.c b/block/blk-mq-tag.c
index 0f5e22a7971f..e47c4c75fd33 100644
--- a/block/blk-mq-tag.c
+++ b/block/blk-mq-tag.c
@@ -158,7 +158,7 @@ restart:
158 return -1; 158 return -1;
159 } 159 }
160 last_tag = tag + 1; 160 last_tag = tag + 1;
161 } while (test_and_set_bit_lock(tag, &bm->word)); 161 } while (test_and_set_bit(tag, &bm->word));
162 162
163 return tag; 163 return tag;
164} 164}
@@ -357,11 +357,10 @@ static void bt_clear_tag(struct blk_mq_bitmap_tags *bt, unsigned int tag)
357 struct bt_wait_state *bs; 357 struct bt_wait_state *bs;
358 int wait_cnt; 358 int wait_cnt;
359 359
360 /* 360 clear_bit(TAG_TO_BIT(bt, tag), &bt->map[index].word);
361 * The unlock memory barrier need to order access to req in free 361
362 * path and clearing tag bit 362 /* Ensure that the wait list checks occur after clear_bit(). */
363 */ 363 smp_mb();
364 clear_bit_unlock(TAG_TO_BIT(bt, tag), &bt->map[index].word);
365 364
366 bs = bt_wake_ptr(bt); 365 bs = bt_wake_ptr(bt);
367 if (!bs) 366 if (!bs)