diff options
| author | Joe Eykholt <jeykholt@cisco.com> | 2010-07-20 18:19:37 -0400 |
|---|---|---|
| committer | James Bottomley <James.Bottomley@suse.de> | 2010-07-28 10:05:48 -0400 |
| commit | 42e9041467cf5fd33501b91b27e26807c259c896 (patch) | |
| tree | 41a335a931e151f3fa00f384b5d1fb024421b7d2 /include | |
| parent | 519e5135e2537c9dbc1cbcc0891b0a936ff5dcd2 (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')
| -rw-r--r-- | include/scsi/libfc.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/include/scsi/libfc.h b/include/scsi/libfc.h index 6d78df77dab6..b0310b9b3469 100644 --- a/include/scsi/libfc.h +++ b/include/scsi/libfc.h | |||
| @@ -195,6 +195,7 @@ struct fc_rport_libfc_priv { | |||
| 195 | * @rp_mutex: The mutex that protects the remote port | 195 | * @rp_mutex: The mutex that protects the remote port |
| 196 | * @retry_work: Handle for retries | 196 | * @retry_work: Handle for retries |
| 197 | * @event_callback: Callback when READY, FAILED or LOGO states complete | 197 | * @event_callback: Callback when READY, FAILED or LOGO states complete |
| 198 | * @rcu: Structure used for freeing in an RCU-safe manner | ||
| 198 | */ | 199 | */ |
| 199 | struct fc_rport_priv { | 200 | struct fc_rport_priv { |
| 200 | struct fc_lport *local_port; | 201 | struct fc_lport *local_port; |
| @@ -217,6 +218,7 @@ struct fc_rport_priv { | |||
| 217 | struct list_head peers; | 218 | struct list_head peers; |
| 218 | struct work_struct event_work; | 219 | struct work_struct event_work; |
| 219 | u32 supported_classes; | 220 | u32 supported_classes; |
| 221 | struct rcu_head rcu; | ||
| 220 | }; | 222 | }; |
| 221 | 223 | ||
| 222 | /** | 224 | /** |
