aboutsummaryrefslogtreecommitdiff
path: root/include/scsi
diff options
context:
space:
mode:
authorJoe Eykholt <jeykholt@cisco.com>2010-07-20 15:19:37 -0700
committerJames Bottomley <James.Bottomley@suse.de>2010-07-28 09:05:48 -0500
commit42e9041467cf5fd33501b91b27e26807c259c896 (patch)
tree41a335a931e151f3fa00f384b5d1fb024421b7d2 /include/scsi
parent519e5135e2537c9dbc1cbcc0891b0a936ff5dcd2 (diff)
[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>
Diffstat (limited to 'include/scsi')
-rw-r--r--include/scsi/libfc.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/scsi/libfc.h b/include/scsi/libfc.h
index 6d78df77dab..b0310b9b346 100644
--- a/include/scsi/libfc.h
+++ b/include/scsi/libfc.h
@@ -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;
};
/**