diff --git a/block/ll_rw_blk.c b/block/ll_rw_blk.c
index f757ed4132147a27beb7c18e6bdd4e916b68cf27..83425fb3c8dba6e2b62122aaa6a02a25d2436ab4 100644
--- a/block/ll_rw_blk.c
+++ b/block/ll_rw_blk.c
@@ -1171,11 +1171,16 @@ int blk_queue_start_tag(request_queue_t *q, struct request *rq)
 		BUG();
 	}
 
-	tag = find_first_zero_bit(bqt->tag_map, bqt->max_depth);
-	if (tag >= bqt->max_depth)
-		return 1;
+	/*
+	 * Protect against shared tag maps, as we may not have exclusive
+	 * access to the tag map.
+	 */
+	do {
+		tag = find_first_zero_bit(bqt->tag_map, bqt->max_depth);
+		if (tag >= bqt->max_depth)
+			return 1;
 
-	__set_bit(tag, bqt->tag_map);
+	} while (test_and_set_bit(tag, bqt->tag_map));
 
 	rq->cmd_flags |= REQ_QUEUED;
 	rq->tag = tag;