96353bb19b
If spdk_nbd_stop is called because of socket error, ioctl of NBD_CLEAR_QUE and NBD_CLEAR_SOCK may be blocked which will cause deadlock. close(kernel_sp_fd/spdk_sp_fd) first, then nbd kernel module will not block them . Change-Id: I9527d74986cbd2b6188b9a91154de8b0b85d2836 Signed-off-by: Xiaodong Liu <xiaodong.liu@intel.com> Reviewed-on: https://review.gerrithub.io/393581 Tested-by: SPDK Automated Test System <sys_sgsw@intel.com> Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com> Reviewed-by: Jim Harris <james.r.harris@intel.com>