fcst: Fix a lockdep warning

git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4960 d57e44dd-8a1f-0410-8b47-8ef2f437770f
This commit is contained in:
Bart Van Assche
2013-08-13 18:37:23 +00:00
parent cf8d18cba8
commit e41c3bf328

View File

@@ -420,7 +420,13 @@ static int ft_prli_locked(struct fc_rport_priv *rdata, u32 spp_len,
if (!(fcp_parm & FCP_SPPF_INIT_FCN))
return FC_SPP_RESP_CONF;
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 34)
tport = rcu_dereference_protected(
rdata->local_port->prov[FC_TYPE_FCP],
lockdep_is_held(&ft_lport_lock));
#else
tport = rcu_dereference(rdata->local_port->prov[FC_TYPE_FCP]);
#endif
if (!tport) {
/* not a target for this local port */
return FC_SPP_RESP_CONF;
@@ -500,7 +506,12 @@ static void ft_prlo(struct fc_rport_priv *rdata)
struct ft_tport *tport;
mutex_lock(&ft_lport_lock);
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 34)
tport = rcu_dereference_protected(rdata->local_port->prov[FC_TYPE_FCP],
lockdep_is_held(&ft_lport_lock));
#else
tport = rcu_dereference(rdata->local_port->prov[FC_TYPE_FCP]);
#endif
if (!tport) {
mutex_unlock(&ft_lport_lock);
return;