mirror of
https://github.com/schoebel/mars
synced 2025-03-03 11:57:45 +00:00
if: move and enable blk_cleanup_queue()
This commit is contained in:
parent
7d4dce3e27
commit
5f6c2a25fe
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user