diff options
| author | John Baldwin <jhb@FreeBSD.org> | 2025-01-31 20:13:52 +0000 |
|---|---|---|
| committer | John Baldwin <jhb@FreeBSD.org> | 2025-01-31 20:13:52 +0000 |
| commit | 17b7a0c595a51eaa7e83f16e99e1555bd13a445b (patch) | |
| tree | 346478c2795ea2df97b598450e167210ef07161d /sys/dev/nvmf | |
| parent | 4015ff43cbbe819316104258da6a79bef76e52c2 (diff) | |
Diffstat (limited to 'sys/dev/nvmf')
| -rw-r--r-- | sys/dev/nvmf/controller/ctl_frontend_nvmf.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/sys/dev/nvmf/controller/ctl_frontend_nvmf.c b/sys/dev/nvmf/controller/ctl_frontend_nvmf.c index 75b36b4834f5..fcfa8b90ebb7 100644 --- a/sys/dev/nvmf/controller/ctl_frontend_nvmf.c +++ b/sys/dev/nvmf/controller/ctl_frontend_nvmf.c @@ -915,7 +915,13 @@ nvmft_port_remove(struct ctl_req *req) TAILQ_REMOVE(&nvmft_ports, np, link); sx_xunlock(&nvmft_ports_lock); - ctl_port_offline(&np->port); + sx_slock(&np->lock); + if (np->online) { + sx_sunlock(&np->lock); + ctl_port_offline(&np->port); + } else + sx_sunlock(&np->lock); + nvmft_port_rele(np); req->status = CTL_LUN_OK; } |
