diff options
Diffstat (limited to 'block/blk-sysfs.c')
-rw-r--r-- | block/blk-sysfs.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/block/blk-sysfs.c b/block/blk-sysfs.c index 0ee17b5e7fb6..e681805cdb47 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 | } |