diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2011-04-20 12:48:52 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2011-04-20 12:48:52 -0400 |
commit | 73aa86825f45cf8efccf20128779416db7c278b2 (patch) | |
tree | fbffdf48afeda5ad45c23e6d7c132ae4a040f080 /drivers | |
parent | 2f666bcf757cb72549f360ef6da02f03620a48b6 (diff) | |
parent | 60735b6362f29b52b5635a2dfa9ab5ad39948345 (diff) |
Merge branch 'for-linus' of git://git.kernel.dk/linux-2.6-block
* 'for-linus' of git://git.kernel.dk/linux-2.6-block:
block: Remove the extra check in queue_requests_store
block, blk-sysfs: Fix an err return path in blk_register_queue()
block: remove stale kerneldoc member from __blk_run_queue()
block: get rid of QUEUE_FLAG_REENTER
cfq-iosched: read_lock() does not always imply rcu_read_lock()
block: kill blk_flush_plug_list() export
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/scsi/scsi_lib.c | 17 | ||||
-rw-r--r-- | drivers/scsi/scsi_transport_fc.c | 19 |
2 files changed, 5 insertions, 31 deletions
diff --git a/drivers/scsi/scsi_lib.c b/drivers/scsi/scsi_lib.c index ab55c2fa7ce2..e9901b8f8443 100644 --- a/drivers/scsi/scsi_lib.c +++ b/drivers/scsi/scsi_lib.c | |||
@@ -411,8 +411,6 @@ static void scsi_run_queue(struct request_queue *q) | |||
411 | list_splice_init(&shost->starved_list, &starved_list); | 411 | list_splice_init(&shost->starved_list, &starved_list); |
412 | 412 | ||
413 | while (!list_empty(&starved_list)) { | 413 | while (!list_empty(&starved_list)) { |
414 | int flagset; | ||
415 | |||
416 | /* | 414 | /* |
417 | * As long as shost is accepting commands and we have | 415 | * As long as shost is accepting commands and we have |
418 | * starved queues, call blk_run_queue. scsi_request_fn | 416 | * starved queues, call blk_run_queue. scsi_request_fn |
@@ -435,20 +433,7 @@ static void scsi_run_queue(struct request_queue *q) | |||
435 | continue; | 433 | continue; |
436 | } | 434 | } |
437 | 435 | ||
438 | spin_unlock(shost->host_lock); | 436 | blk_run_queue_async(sdev->request_queue); |
439 | |||
440 | spin_lock(sdev->request_queue->queue_lock); | ||
441 | flagset = test_bit(QUEUE_FLAG_REENTER, &q->queue_flags) && | ||
442 | !test_bit(QUEUE_FLAG_REENTER, | ||
443 | &sdev->request_queue->queue_flags); | ||
444 | if (flagset) | ||
445 | queue_flag_set(QUEUE_FLAG_REENTER, sdev->request_queue); | ||
446 | __blk_run_queue(sdev->request_queue); | ||
447 | if (flagset) | ||
448 | queue_flag_clear(QUEUE_FLAG_REENTER, sdev->request_queue); | ||
449 | spin_unlock(sdev->request_queue->queue_lock); | ||
450 | |||
451 | spin_lock(shost->host_lock); | ||
452 | } | 437 | } |
453 | /* put any unprocessed entries back */ | 438 | /* put any unprocessed entries back */ |
454 | list_splice(&starved_list, &shost->starved_list); | 439 | list_splice(&starved_list, &shost->starved_list); |
diff --git a/drivers/scsi/scsi_transport_fc.c b/drivers/scsi/scsi_transport_fc.c index 28c33506e4ad..815069d13f9b 100644 --- a/drivers/scsi/scsi_transport_fc.c +++ b/drivers/scsi/scsi_transport_fc.c | |||
@@ -3816,28 +3816,17 @@ fail_host_msg: | |||
3816 | static void | 3816 | static void |
3817 | fc_bsg_goose_queue(struct fc_rport *rport) | 3817 | fc_bsg_goose_queue(struct fc_rport *rport) |
3818 | { | 3818 | { |
3819 | int flagset; | ||
3820 | unsigned long flags; | ||
3821 | |||
3822 | if (!rport->rqst_q) | 3819 | if (!rport->rqst_q) |
3823 | return; | 3820 | return; |
3824 | 3821 | ||
3822 | /* | ||
3823 | * This get/put dance makes no sense | ||
3824 | */ | ||
3825 | get_device(&rport->dev); | 3825 | get_device(&rport->dev); |
3826 | 3826 | blk_run_queue_async(rport->rqst_q); | |
3827 | spin_lock_irqsave(rport->rqst_q->queue_lock, flags); | ||
3828 | flagset = test_bit(QUEUE_FLAG_REENTER, &rport->rqst_q->queue_flags) && | ||
3829 | !test_bit(QUEUE_FLAG_REENTER, &rport->rqst_q->queue_flags); | ||
3830 | if (flagset) | ||
3831 | queue_flag_set(QUEUE_FLAG_REENTER, rport->rqst_q); | ||
3832 | __blk_run_queue(rport->rqst_q); | ||
3833 | if (flagset) | ||
3834 | queue_flag_clear(QUEUE_FLAG_REENTER, rport->rqst_q); | ||
3835 | spin_unlock_irqrestore(rport->rqst_q->queue_lock, flags); | ||
3836 | |||
3837 | put_device(&rport->dev); | 3827 | put_device(&rport->dev); |
3838 | } | 3828 | } |
3839 | 3829 | ||
3840 | |||
3841 | /** | 3830 | /** |
3842 | * fc_bsg_rport_dispatch - process rport bsg requests and dispatch to LLDD | 3831 | * fc_bsg_rport_dispatch - process rport bsg requests and dispatch to LLDD |
3843 | * @q: rport request queue | 3832 | * @q: rport request queue |