if: move and enable blk_cleanup_queue()

This commit is contained in:
Thomas Schoebel-Theuer 2015-07-06 17:36:01 +02:00
parent 7d4dce3e27
commit 5f6c2a25fe

View File

@ -979,13 +979,6 @@ static int if_switch(struct if_brick *brick)
if (!disk)
goto is_down;
#if 0
q = disk->queue;
if (q) {
blk_cleanup_queue(q);
input->q = NULL;
}
#endif
opened = atomic_read(&brick->open_count);
if (unlikely(opened > 0)) {
MARS_INF("device '%s' is open %d times, cannot shutdown\n", disk->disk_name, opened);
@ -1019,6 +1012,11 @@ static int if_switch(struct if_brick *brick)
MARS_DBG("calling put_disk()\n");
put_disk(input->disk);
input->disk = NULL;
q = input->q;
if (q) {
blk_cleanup_queue(q);
input->q = NULL;
}
status = 0;
is_down:
mars_power_led_off((void*)brick, true);