Commit 91183344 authored by Dave Dillow's avatar Dave Dillow Committed by James Bottomley

[SCSI] SRP transport: only remove our own entries

The SCSI SRP transport class currently iterates over all children
devices of the host that is being removed in srp_remove_host(). However,
not all of those children were created by the SRP transport, and
removing them will cause corruption and an oops when their creator tries
to remove them.
Signed-off-by: default avatarDavid Dillow <dillowda@ornl.gov>
Acked-by: default avatarFUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Signed-off-by: default avatarJames Bottomley <James.Bottomley@HansenPartnership.com>
parent 439f61b9
...@@ -265,6 +265,7 @@ EXPORT_SYMBOL_GPL(srp_rport_del); ...@@ -265,6 +265,7 @@ EXPORT_SYMBOL_GPL(srp_rport_del);
static int do_srp_rport_del(struct device *dev, void *data) static int do_srp_rport_del(struct device *dev, void *data)
{ {
if (scsi_is_srp_rport(dev))
srp_rport_del(dev_to_rport(dev)); srp_rport_del(dev_to_rport(dev));
return 0; return 0;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment