Skip to content

Commit d8f6382

Browse files
rosslagerwallmartinkpetersen
authored andcommitted
Revert "scsi: libfc: Add WARN_ON() when deleting rports"
This reverts commit bbc0f8b. It added a warning whose intent was to check whether the rport was still linked into the peer list. It doesn't work as intended and gives false positive warnings for two reasons: 1) If the rport is never linked into the peer list it will not be considered empty since the list_head is never initialized. 2) If the rport is deleted from the peer list using list_del_rcu(), then the list_head is in an undefined state and it is not considered empty. Signed-off-by: Ross Lagerwall <ross.lagerwall@citrix.com> Reviewed-by: Hannes Reinecke <hare@suse.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
1 parent 88fc41c commit d8f6382

File tree

1 file changed

+0
-1
lines changed

1 file changed

+0
-1
lines changed

drivers/scsi/libfc/fc_rport.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -184,7 +184,6 @@ void fc_rport_destroy(struct kref *kref)
184184
struct fc_rport_priv *rdata;
185185

186186
rdata = container_of(kref, struct fc_rport_priv, kref);
187-
WARN_ON(!list_empty(&rdata->peers));
188187
kfree_rcu(rdata, rcu);
189188
}
190189
EXPORT_SYMBOL(fc_rport_destroy);

0 commit comments

Comments
 (0)