提交 8d080236 编写于 作者: B Bart Van Assche 提交者: Robert Love

libfc: Clarify fc_exch_find()

The condition ep != NULL && ep->xid != xid can never be met. Make
this explicit.
Signed-off-by: NBart Van Assche <bvanassche@acm.org>
Cc: Neil Horman <nhorman@tuxdriver.com>
Signed-off-by: NRobert Love <robert.w.love@intel.com>
上级 a84ea8c7
......@@ -836,8 +836,10 @@ static struct fc_exch *fc_exch_find(struct fc_exch_mgr *mp, u16 xid)
pool = per_cpu_ptr(mp->pool, xid & fc_cpu_mask);
spin_lock_bh(&pool->lock);
ep = fc_exch_ptr_get(pool, (xid - mp->min_xid) >> fc_cpu_order);
if (ep && ep->xid == xid)
if (ep) {
WARN_ON(ep->xid != xid);
fc_exch_hold(ep);
}
spin_unlock_bh(&pool->lock);
}
return ep;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册
新手
引导
客服 返回
顶部