aboutsummaryrefslogtreecommitdiffstats
path: root/block/ll_rw_blk.c
diff options
context:
space:
mode:
Diffstat (limited to 'block/ll_rw_blk.c')
-rw-r--r--block/ll_rw_blk.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/block/ll_rw_blk.c b/block/ll_rw_blk.c
index 5fac138a5be1..caa8fcf5474b 100644
--- a/block/ll_rw_blk.c
+++ b/block/ll_rw_blk.c
@@ -3614,10 +3614,13 @@ static ssize_t
3614queue_requests_store(struct request_queue *q, const char *page, size_t count) 3614queue_requests_store(struct request_queue *q, const char *page, size_t count)
3615{ 3615{
3616 struct request_list *rl = &q->rq; 3616 struct request_list *rl = &q->rq;
3617 unsigned long nr;
3618 int ret = queue_var_store(&nr, page, count);
3619 if (nr < BLKDEV_MIN_RQ)
3620 nr = BLKDEV_MIN_RQ;
3617 3621
3618 int ret = queue_var_store(&q->nr_requests, page, count); 3622 spin_lock_irq(q->queue_lock);
3619 if (q->nr_requests < BLKDEV_MIN_RQ) 3623 q->nr_requests = nr;
3620 q->nr_requests = BLKDEV_MIN_RQ;
3621 blk_queue_congestion_threshold(q); 3624 blk_queue_congestion_threshold(q);
3622 3625
3623 if (rl->count[READ] >= queue_congestion_on_threshold(q)) 3626 if (rl->count[READ] >= queue_congestion_on_threshold(q))
@@ -3643,6 +3646,7 @@ queue_requests_store(struct request_queue *q, const char *page, size_t count)
3643 blk_clear_queue_full(q, WRITE); 3646 blk_clear_queue_full(q, WRITE);
3644 wake_up(&rl->wait[WRITE]); 3647 wake_up(&rl->wait[WRITE]);
3645 } 3648 }
3649 spin_unlock_irq(q->queue_lock);
3646 return ret; 3650 return ret;
3647} 3651}
3648 3652