Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 37592
b: refs/heads/master
c: 059af49
h: refs/heads/master
v: v3
  • Loading branch information
Jens Axboe authored and Jens Axboe committed Sep 30, 2006
1 parent 16f98ee commit c51bc66
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 5 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 0fe23479577124bd2687e6783e39fa0fa4c28005
refs/heads/master: 059af497c23492cb1ddcbba11c09dad385960bc0
13 changes: 9 additions & 4 deletions trunk/block/ll_rw_blk.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit c51bc66

Please sign in to comment.