aboutsummaryrefslogtreecommitdiffstats
path: root/block/blk-sysfs.c
diff options
context:
space:
mode:
Diffstat (limited to 'block/blk-sysfs.c')
-rw-r--r--block/blk-sysfs.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/block/blk-sysfs.c b/block/blk-sysfs.c
index 13d38b7e4d0f..142a4acddd43 100644
--- a/block/blk-sysfs.c
+++ b/block/blk-sysfs.c
@@ -95,7 +95,7 @@ queue_ra_store(struct request_queue *q, const char *page, size_t count)
95 95
96static ssize_t queue_max_sectors_show(struct request_queue *q, char *page) 96static ssize_t queue_max_sectors_show(struct request_queue *q, char *page)
97{ 97{
98 int max_sectors_kb = q->max_sectors >> 1; 98 int max_sectors_kb = queue_max_sectors(q) >> 1;
99 99
100 return queue_var_show(max_sectors_kb, (page)); 100 return queue_var_show(max_sectors_kb, (page));
101} 101}
@@ -109,7 +109,7 @@ static ssize_t
109queue_max_sectors_store(struct request_queue *q, const char *page, size_t count) 109queue_max_sectors_store(struct request_queue *q, const char *page, size_t count)
110{ 110{
111 unsigned long max_sectors_kb, 111 unsigned long max_sectors_kb,
112 max_hw_sectors_kb = q->max_hw_sectors >> 1, 112 max_hw_sectors_kb = queue_max_hw_sectors(q) >> 1,
113 page_kb = 1 << (PAGE_CACHE_SHIFT - 10); 113 page_kb = 1 << (PAGE_CACHE_SHIFT - 10);
114 ssize_t ret = queue_var_store(&max_sectors_kb, page, count); 114 ssize_t ret = queue_var_store(&max_sectors_kb, page, count);
115 115
@@ -117,7 +117,7 @@ queue_max_sectors_store(struct request_queue *q, const char *page, size_t count)
117 return -EINVAL; 117 return -EINVAL;
118 118
119 spin_lock_irq(q->queue_lock); 119 spin_lock_irq(q->queue_lock);
120 q->max_sectors = max_sectors_kb << 1; 120 blk_queue_max_sectors(q, max_sectors_kb << 1);
121 spin_unlock_irq(q->queue_lock); 121 spin_unlock_irq(q->queue_lock);
122 122
123 return ret; 123 return ret;
@@ -125,7 +125,7 @@ queue_max_sectors_store(struct request_queue *q, const char *page, size_t count)
125 125
126static ssize_t queue_max_hw_sectors_show(struct request_queue *q, char *page) 126static ssize_t queue_max_hw_sectors_show(struct request_queue *q, char *page)
127{ 127{
128 int max_hw_sectors_kb = q->max_hw_sectors >> 1; 128 int max_hw_sectors_kb = queue_max_hw_sectors(q) >> 1;
129 129
130 return queue_var_show(max_hw_sectors_kb, (page)); 130 return queue_var_show(max_hw_sectors_kb, (page));
131} 131}