Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 273797
b: refs/heads/master
c: 315fcee
h: refs/heads/master
i:
  273795: 6dc5ae7
v: v3
  • Loading branch information
Tejun Heo authored and Jens Axboe committed Oct 19, 2011
1 parent 950cd23 commit 1a1c52c
Show file tree
Hide file tree
Showing 3 changed files with 3 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: 75eb6c372d41d6d140b893873f6687d78c987a44
refs/heads/master: 315fceee81155ef2aeed9316ca72aeea9347db5c
8 changes: 1 addition & 7 deletions trunk/block/blk-throttle.c
Original file line number Diff line number Diff line change
Expand Up @@ -324,12 +324,8 @@ static struct throtl_grp * throtl_get_tg(struct throtl_data *td)
/*
* Need to allocate a group. Allocation of group also needs allocation
* of per cpu stats which in-turn takes a mutex() and can block. Hence
* we need to drop rcu lock and queue_lock before we call alloc
*
* Take the request queue reference to make sure queue does not
* go away once we return from allocation.
* we need to drop rcu lock and queue_lock before we call alloc.
*/
blk_get_queue(q);
rcu_read_unlock();
spin_unlock_irq(q->queue_lock);

Expand All @@ -339,13 +335,11 @@ static struct throtl_grp * throtl_get_tg(struct throtl_data *td)
* dead
*/
if (unlikely(test_bit(QUEUE_FLAG_DEAD, &q->queue_flags))) {
blk_put_queue(q);
if (tg)
kfree(tg);

return ERR_PTR(-ENODEV);
}
blk_put_queue(q);

/* Group allocated and queue is still alive. take the lock */
spin_lock_irq(q->queue_lock);
Expand Down
3 changes: 1 addition & 2 deletions trunk/block/scsi_ioctl.c
Original file line number Diff line number Diff line change
Expand Up @@ -565,7 +565,7 @@ int scsi_cmd_ioctl(struct request_queue *q, struct gendisk *bd_disk, fmode_t mod
{
int err;

if (!q || blk_get_queue(q))
if (!q)
return -ENXIO;

switch (cmd) {
Expand Down Expand Up @@ -686,7 +686,6 @@ int scsi_cmd_ioctl(struct request_queue *q, struct gendisk *bd_disk, fmode_t mod
err = -ENOTTY;
}

blk_put_queue(q);
return err;
}
EXPORT_SYMBOL(scsi_cmd_ioctl);
Expand Down

0 comments on commit 1a1c52c

Please sign in to comment.