]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
nbd: Add the nbd NBD_DISCONNECT_ON_CLOSE config flag.
authorDoron Roberts-Kedes <doronrk@fb.com>
Fri, 15 Jun 2018 21:05:32 +0000 (14:05 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 24 Aug 2018 11:06:46 +0000 (13:06 +0200)
commitb043ccf7399c7e70a42e4d9fb2f4cd146410f78b
tree2c5d0e8073a8f6cf76dc7f64abdd264095798ccb
parent473c7b01ff67a44a1d745de3162541697a3e6880
nbd: Add the nbd NBD_DISCONNECT_ON_CLOSE config flag.

[ Upstream commit 08ba91ee6e2c1c08d3f0648f978cbb5dbf3491d8 ]

If NBD_DISCONNECT_ON_CLOSE is set on a device, then the driver will
issue a disconnect from nbd_release if the device has no remaining
bdev->bd_openers.

Fix ret val so reconfigure with only setting the flag succeeds.

Reviewed-by: Josef Bacik <josef@toxicpanda.com>
Signed-off-by: Doron Roberts-Kedes <doronrk@fb.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Signed-off-by: Sasha Levin <alexander.levin@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/block/nbd.c
include/uapi/linux/nbd.h