Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 2911
b: refs/heads/master
c: fde6ad2
h: refs/heads/master
i:
  2909: aca4866
  2907: 359165c
  2903: 1e50078
  2895: 6f96a27
  2879: 5c17fc2
v: v3
  • Loading branch information
Nick Piggin authored and Linus Torvalds committed Jun 23, 2005
1 parent dd5319c commit 8c395b8
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 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: 250dccc00805e755a6d80a73557034253da0831f
refs/heads/master: fde6ad22480cdc2eaa102b805a3ed3ee1d36a376
12 changes: 6 additions & 6 deletions trunk/drivers/block/ll_rw_blk.c
Original file line number Diff line number Diff line change
Expand Up @@ -1439,7 +1439,7 @@ EXPORT_SYMBOL(blk_remove_plug);
*/
void __generic_unplug_device(request_queue_t *q)
{
if (test_bit(QUEUE_FLAG_STOPPED, &q->queue_flags))
if (unlikely(test_bit(QUEUE_FLAG_STOPPED, &q->queue_flags)))
return;

if (!blk_remove_plug(q))
Expand Down Expand Up @@ -1763,7 +1763,7 @@ EXPORT_SYMBOL(blk_init_queue_node);

int blk_get_queue(request_queue_t *q)
{
if (!test_bit(QUEUE_FLAG_DEAD, &q->queue_flags)) {
if (likely(!test_bit(QUEUE_FLAG_DEAD, &q->queue_flags))) {
atomic_inc(&q->refcnt);
return 0;
}
Expand Down Expand Up @@ -2584,7 +2584,7 @@ static int __make_request(request_queue_t *q, struct bio *bio)
spin_lock_prefetch(q->queue_lock);

barrier = bio_barrier(bio);
if (barrier && (q->ordered == QUEUE_ORDERED_NONE)) {
if (unlikely(barrier) && (q->ordered == QUEUE_ORDERED_NONE)) {
err = -EOPNOTSUPP;
goto end_io;
}
Expand Down Expand Up @@ -2685,7 +2685,7 @@ static int __make_request(request_queue_t *q, struct bio *bio)
/*
* REQ_BARRIER implies no merging, but lets make it explicit
*/
if (barrier)
if (unlikely(barrier))
req->flags |= (REQ_HARDBARRIER | REQ_NOMERGE);

req->errors = 0;
Expand Down Expand Up @@ -2809,7 +2809,7 @@ static inline void block_wait_queue_running(request_queue_t *q)
{
DEFINE_WAIT(wait);

while (test_bit(QUEUE_FLAG_DRAIN, &q->queue_flags)) {
while (unlikely(test_bit(QUEUE_FLAG_DRAIN, &q->queue_flags))) {
struct request_list *rl = &q->rq;

prepare_to_wait_exclusive(&rl->drain, &wait,
Expand Down Expand Up @@ -2918,7 +2918,7 @@ void generic_make_request(struct bio *bio)
goto end_io;
}

if (test_bit(QUEUE_FLAG_DEAD, &q->queue_flags))
if (unlikely(test_bit(QUEUE_FLAG_DEAD, &q->queue_flags)))
goto end_io;

block_wait_queue_running(q);
Expand Down

0 comments on commit 8c395b8

Please sign in to comment.