[SCSI] libfc: convert rport lookup to be RCU safe
To allow LLD to do lookups on rports without grabbing a mutex, make them RCU-safe. The caller of lport->tt.rport_lookup will have the choice of holding disc_mutex or the rcu_read_lock(). Signed-off-by: Joe Eykholt <jeykholt@cisco.com> Signed-off-by: Robert Love <robert.w.love@intel.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
This commit is contained in:

committed by
James Bottomley

parent
519e5135e2
commit
42e9041467
@@ -195,6 +195,7 @@ struct fc_rport_libfc_priv {
|
||||
* @rp_mutex: The mutex that protects the remote port
|
||||
* @retry_work: Handle for retries
|
||||
* @event_callback: Callback when READY, FAILED or LOGO states complete
|
||||
* @rcu: Structure used for freeing in an RCU-safe manner
|
||||
*/
|
||||
struct fc_rport_priv {
|
||||
struct fc_lport *local_port;
|
||||
@@ -217,6 +218,7 @@ struct fc_rport_priv {
|
||||
struct list_head peers;
|
||||
struct work_struct event_work;
|
||||
u32 supported_classes;
|
||||
struct rcu_head rcu;
|
||||
};
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user