Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 2906
b: refs/heads/master
c: 2bf0fda
h: refs/heads/master
v: v3
  • Loading branch information
Tejun Heo authored and Linus Torvalds committed Jun 23, 2005
1 parent 7117e02 commit 9db6ceb
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 10 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: 15d20bfd606c4b4454aeaa05fc86f77994e48c92
refs/heads/master: 2bf0fdad51c6710bf15d0bf4b9b30b8498fe4ddd
13 changes: 4 additions & 9 deletions trunk/drivers/block/ll_rw_blk.c
Original file line number Diff line number Diff line change
Expand Up @@ -968,8 +968,7 @@ EXPORT_SYMBOL(blk_queue_end_tag);
int blk_queue_start_tag(request_queue_t *q, struct request *rq)
{
struct blk_queue_tag *bqt = q->queue_tags;
unsigned long *map = bqt->tag_map;
int tag = 0;
int tag;

if (unlikely((rq->flags & REQ_QUEUED))) {
printk(KERN_ERR
Expand All @@ -978,14 +977,10 @@ int blk_queue_start_tag(request_queue_t *q, struct request *rq)
BUG();
}

for (map = bqt->tag_map; *map == -1UL; map++) {
tag += BLK_TAGS_PER_LONG;

if (tag >= bqt->max_depth)
return 1;
}
tag = find_first_zero_bit(bqt->tag_map, bqt->max_depth);
if (tag >= bqt->max_depth)
return 1;

tag += ffz(*map);
__set_bit(tag, bqt->tag_map);

rq->flags |= REQ_QUEUED;
Expand Down

0 comments on commit 9db6ceb

Please sign in to comment.