mirror of
https://github.com/torvalds/linux.git
synced 2026-05-27 08:33:17 +02:00
nvmet-fcloop: check all request and response have been processed
When the remoteport or the targetport are removed check that there are no inflight requests or responses. Reviewed-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Daniel Wagner <wagi@kernel.org> Signed-off-by: Keith Busch <kbusch@kernel.org>
This commit is contained in:
parent
67582dfd87
commit
f9929c518d
|
|
@ -1111,8 +1111,10 @@ fcloop_remoteport_delete(struct nvme_fc_remote_port *remoteport)
|
|||
rport->nport->rport = NULL;
|
||||
spin_unlock_irqrestore(&fcloop_lock, flags);
|
||||
|
||||
if (put_port)
|
||||
if (put_port) {
|
||||
WARN_ON(!list_empty(&rport->ls_list));
|
||||
fcloop_nport_put(rport->nport);
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
|
|
@ -1130,8 +1132,10 @@ fcloop_targetport_delete(struct nvmet_fc_target_port *targetport)
|
|||
tport->nport->tport = NULL;
|
||||
spin_unlock_irqrestore(&fcloop_lock, flags);
|
||||
|
||||
if (put_port)
|
||||
if (put_port) {
|
||||
WARN_ON(!list_empty(&tport->ls_list));
|
||||
fcloop_nport_put(tport->nport);
|
||||
}
|
||||
}
|
||||
|
||||
#define FCLOOP_HW_QUEUES 4
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user