Skip to content

Commit 96d97e1

Browse files
Josef Bacikaxboe
authored andcommitted
nbd: clear_sock on netlink disconnect
This is what the ioctl based nbd disconnect does as well. Without this the device will just sit there and wait for the connection to go away (or IO to occur) before the device gets torn down. Instead clear everything up on our end so the configuration goes away as quickly as possible. Signed-off-by: Josef Bacik <[email protected]> Signed-off-by: Jens Axboe <[email protected]>
1 parent 9e2b196 commit 96d97e1

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

drivers/block/nbd.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1768,6 +1768,7 @@ static int nbd_genl_disconnect(struct sk_buff *skb, struct genl_info *info)
17681768
}
17691769
mutex_lock(&nbd->config_lock);
17701770
nbd_disconnect(nbd);
1771+
nbd_clear_sock(nbd);
17711772
mutex_unlock(&nbd->config_lock);
17721773
if (test_and_clear_bit(NBD_HAS_CONFIG_REF,
17731774
&nbd->config->runtime_flags))

0 commit comments

Comments
 (0)