Hi folks,
I am reading the code because I am interested in adding SMB2.2/3.0
support around multi-connect.
I noticed the following code, which confuses me.
/* put it on the pending_mid_q */
spin_lock(&GlobalMid_Lock);
list_add_tail(&mid->qhead, &server->pending_mid_q);
spin_unlock(&GlobalMid_Lock);
rc = cifs_sign_smb2(iov, nvec, server, &mid->sequence_number);
if (rc)
cifs_delete_mid(mid);
*ret_mid = mid;
return rc;
Since MIDs are allocated on a per-server basis and the list that the
new struct mid_q_entry is placed on is in the struct TCP_Server_Info
why are we using GlobalMid_Lock. It seems that we could move that
spinlock into struct TCP_Server_Info.
What am I missing here?
--
Regards,
Richard Sharpe
(何以解憂?唯有杜康。--曹操)
--
To unsubscribe from this list: send the line "unsubscribe linux-cifs" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html