diff options
author | Jens Axboe <axboe@kernel.dk> | 2011-10-19 08:30:42 -0400 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2011-10-19 08:30:42 -0400 |
commit | 5c04b426f2e8b46cfc7969a35b2631063a3c646c (patch) | |
tree | 2d27d9f5d2fe5d5e8fbc01a467ec58bcb50235c1 /block/blk-sysfs.c | |
parent | 499337bb6511e665a236a6a947f819d98ea340c6 (diff) | |
parent | 899e3ee404961a90b828ad527573aaaac39f0ab1 (diff) |
Merge branch 'v3.1-rc10' into for-3.2/core
Conflicts:
block/blk-core.c
include/linux/blkdev.h
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'block/blk-sysfs.c')
-rw-r--r-- | block/blk-sysfs.c | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/block/blk-sysfs.c b/block/blk-sysfs.c index adc923e9d1f8..a8eff5f8b9c5 100644 --- a/block/blk-sysfs.c +++ b/block/blk-sysfs.c | |||
@@ -258,11 +258,13 @@ queue_rq_affinity_store(struct request_queue *q, const char *page, size_t count) | |||
258 | 258 | ||
259 | ret = queue_var_store(&val, page, count); | 259 | ret = queue_var_store(&val, page, count); |
260 | spin_lock_irq(q->queue_lock); | 260 | spin_lock_irq(q->queue_lock); |
261 | if (val) { | 261 | if (val == 2) { |
262 | queue_flag_set(QUEUE_FLAG_SAME_COMP, q); | 262 | queue_flag_set(QUEUE_FLAG_SAME_COMP, q); |
263 | if (val == 2) | 263 | queue_flag_set(QUEUE_FLAG_SAME_FORCE, q); |
264 | queue_flag_set(QUEUE_FLAG_SAME_FORCE, q); | 264 | } else if (val == 1) { |
265 | } else { | 265 | queue_flag_set(QUEUE_FLAG_SAME_COMP, q); |
266 | queue_flag_clear(QUEUE_FLAG_SAME_FORCE, q); | ||
267 | } else if (val == 0) { | ||
266 | queue_flag_clear(QUEUE_FLAG_SAME_COMP, q); | 268 | queue_flag_clear(QUEUE_FLAG_SAME_COMP, q); |
267 | queue_flag_clear(QUEUE_FLAG_SAME_FORCE, q); | 269 | queue_flag_clear(QUEUE_FLAG_SAME_FORCE, q); |
268 | } | 270 | } |
@@ -477,6 +479,11 @@ static void blk_release_queue(struct kobject *kobj) | |||
477 | 479 | ||
478 | blk_sync_queue(q); | 480 | blk_sync_queue(q); |
479 | 481 | ||
482 | if (q->elevator) | ||
483 | elevator_exit(q->elevator); | ||
484 | |||
485 | blk_throtl_exit(q); | ||
486 | |||
480 | if (rl->rq_pool) | 487 | if (rl->rq_pool) |
481 | mempool_destroy(rl->rq_pool); | 488 | mempool_destroy(rl->rq_pool); |
482 | 489 | ||