mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-08-25 02:09:42 +00:00
nbd: allow multiple disconnects to be sent
There's no reason to limit ourselves to one disconnect message per socket. Sometimes networks do strange things, might as well let sysadmins hit the panic button as much as they want. Signed-off-by: Josef Bacik <jbacik@fb.com> Signed-off-by: Jens Axboe <axboe@kernel.dk>
This commit is contained in:
parent
82abbea734
commit
2e13456fb3
1 changed files with 2 additions and 3 deletions
|
@ -991,9 +991,8 @@ static int nbd_disconnect(struct nbd_device *nbd)
|
|||
struct nbd_config *config = nbd->config;
|
||||
|
||||
dev_info(disk_to_dev(nbd->disk), "NBD_DISCONNECT\n");
|
||||
if (!test_and_set_bit(NBD_DISCONNECT_REQUESTED,
|
||||
&config->runtime_flags))
|
||||
send_disconnects(nbd);
|
||||
set_bit(NBD_DISCONNECT_REQUESTED, &config->runtime_flags);
|
||||
send_disconnects(nbd);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue