1
0
Fork 0
alistair23-linux/block
Tejun Heo 315fceee81 block: drop unnecessary blk_get/put_queue() in scsi_cmd_ioctl() and blk_get_tg()
blk_get/put_queue() in scsi_cmd_ioctl() and throtl_get_tg() are
completely bogus.  The caller must have a reference to the queue on
entry and taking an extra reference doesn't change anything.

For scsi_cmd_ioctl(), the only effect is that it ends up checking
QUEUE_FLAG_DEAD on entry; however, this is bogus as queue can die
right after blk_get_queue().  Dead queue should be and is handled in
request issue path (it's somewhat broken now but that's a separate
problem and doesn't affect this one much).

throtl_get_tg() incorrectly assumes that q is rcu freed.  Also, it
doesn't check return value of blk_get_queue().  If the queue is
already dead, it ends up doing an extra put.

Drop them.

Signed-off-by: Tejun Heo <tj@kernel.org>
Cc: Vivek Goyal <vgoyal@redhat.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
2011-10-19 14:31:25 +02:00
..
Kconfig block: add bsg helper library 2011-07-31 22:05:09 +02:00
Kconfig.iosched blk-cgroup: config options re-arrangement 2010-04-26 19:27:56 +02:00
Makefile block: add bsg helper library 2011-07-31 22:05:09 +02:00
blk-cgroup.c block: fix genhd refcounting in blkio_policy_parse_and_set() 2011-10-19 14:31:15 +02:00
blk-cgroup.h cfq-iosched: Make IO merge related stats per cpu 2011-05-23 10:02:19 +02:00
blk-core.c block: pass around REQ_* flags instead of broken down booleans during request alloc/free 2011-10-19 14:31:22 +02:00
blk-exec.c [SCSI] fix crash in scsi_dispatch_cmd() 2011-07-21 14:21:18 -07:00
blk-flush.c block: fix flush machinery for stacking drivers with differring flush flags 2011-08-15 21:37:25 +02:00
blk-integrity.c dm: improve block integrity support 2011-04-05 23:52:43 +02:00
blk-ioc.c Merge branch 'for-linus' into for-3.1/core 2011-07-01 16:17:13 +02:00
blk-iopoll.c tree-wide: fix assorted typos all over the place 2009-12-04 15:39:55 +01:00
blk-lib.c block: fix patch import error in max_discard_sectors check 2011-07-23 20:34:59 +02:00
blk-map.c block: check for proper length of iov entries earlier in blk_rq_map_user_iov() 2010-11-29 10:04:50 +01:00
blk-merge.c block: attempt to merge with existing requests on plug flush 2011-03-21 10:14:27 +01:00
blk-settings.c block: Fix discard topology stacking and reporting 2011-05-18 10:37:35 +02:00
blk-softirq.c block: Don't check QUEUE_FLAG_SAME_COMP in __blk_complete_request 2011-09-14 09:31:01 +02:00
blk-sysfs.c Merge branch 'v3.1-rc10' into for-3.2/core 2011-10-19 14:30:42 +02:00
blk-tag.c include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h 2010-03-30 22:02:32 +09:00
blk-throttle.c block: drop unnecessary blk_get/put_queue() in scsi_cmd_ioctl() and blk_get_tg() 2011-10-19 14:31:25 +02:00
blk-timeout.c fault-injection: add ability to export fault_attr in arbitrary directory 2011-08-03 14:25:20 -10:00
blk.h block: move blk_throtl prototypes to block/blk.h 2011-10-19 14:31:18 +02:00
bsg-lib.c bsg-lib: add module.h include 2011-08-02 10:43:35 +02:00
bsg.c bsg: fix address space warning from sparse 2011-06-20 13:27:45 +02:00
cfq-iosched.c block: separate priority boosting from REQ_META 2011-08-23 14:50:29 +02:00
cfq.h blk-cgroup: Add unaccounted time to timeslice_used. 2011-03-12 16:54:00 +01:00
compat_ioctl.c compat_ioctl: fix warning caused by qemu 2011-07-01 22:32:26 +02:00
deadline-iosched.c iosched: prevent aliased requests from starving other I/O 2011-06-02 21:19:05 +02:00
elevator.c elevator: use ELV_NAME_MAX instead of magic number 16 for chosen_elevator 2011-09-12 08:59:20 +02:00
genhd.c block: make gendisk hold a reference to its queue 2011-10-19 14:31:07 +02:00
ioctl.c block: fix refcounting in BLKBSZSET 2011-02-24 08:54:21 -08:00
noop-iosched.c block: remove per-queue plugging 2011-03-10 08:52:07 +01:00
scsi_ioctl.c block: drop unnecessary blk_get/put_queue() in scsi_cmd_ioctl() and blk_get_tg() 2011-10-19 14:31:25 +02:00