block/rnbd-srv: Protect dev session sysfs removal
authorMd Haris Iqbal <haris.iqbal@cloud.ionos.com>
Thu, 10 Dec 2020 10:18:22 +0000 (11:18 +0100)
committerJens Axboe <axboe@kernel.dk>
Wed, 16 Dec 2020 21:55:50 +0000 (14:55 -0700)
commit87019e7d99d707e60e20ea3245a561419d5de5ce
treef3c2ce201f44310ad99ca76b7f89e2bc81ff7b5b
parent46067844efdb8275ade705923120fc5391543b53
block/rnbd-srv: Protect dev session sysfs removal

Since the removal of the session sysfs can also be called from the
function destroy_sess, there is a need to protect the call from the
function rnbd_srv_sess_dev_force_close

Fixes: 786998050cbc ("block/rnbd-srv: close a mapped device from server side.")
Signed-off-by: Md Haris Iqbal <haris.iqbal@cloud.ionos.com>
Reviewed-by: Guoqing Jiang <guoqing.jiang@cloud.ionos.com>
Signed-off-by: Jack Wang <jinpu.wang@cloud.ionos.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
drivers/block/rnbd/rnbd-srv.c