mirror of
https://github.com/torvalds/linux.git
synced 2026-06-03 12:03:54 +02:00
smb: client: pass struct smbdirect_socket to smbd_post_recv()
This will make it easier to move function to the common code in future. Cc: Steve French <smfrench@gmail.com> Cc: Tom Talpey <tom@talpey.com> Cc: Long Li <longli@microsoft.com> Cc: linux-cifs@vger.kernel.org Cc: samba-technical@lists.samba.org Acked-by: Namjae Jeon <linkinjeon@kernel.org> Signed-off-by: Stefan Metzmacher <metze@samba.org> Signed-off-by: Steve French <stfrench@microsoft.com>
This commit is contained in:
parent
c7e4d5facb
commit
be8602d47d
|
|
@ -35,7 +35,7 @@ static struct smbdirect_recv_io *_get_first_reassembly(
|
|||
struct smbdirect_socket *sc);
|
||||
|
||||
static int smbd_post_recv(
|
||||
struct smbd_connection *info,
|
||||
struct smbdirect_socket *sc,
|
||||
struct smbdirect_recv_io *response);
|
||||
|
||||
static int smbd_post_send_empty(struct smbd_connection *info);
|
||||
|
|
@ -535,8 +535,6 @@ static void smbd_post_send_credits(struct work_struct *work)
|
|||
struct smbdirect_recv_io *response;
|
||||
struct smbdirect_socket *sc =
|
||||
container_of(work, struct smbdirect_socket, recv_io.posted.refill_work);
|
||||
struct smbd_connection *info =
|
||||
container_of(sc, struct smbd_connection, socket);
|
||||
|
||||
if (sc->status != SMBDIRECT_SOCKET_CONNECTED) {
|
||||
return;
|
||||
|
|
@ -550,7 +548,7 @@ static void smbd_post_send_credits(struct work_struct *work)
|
|||
break;
|
||||
|
||||
response->first_segment = false;
|
||||
rc = smbd_post_recv(info, response);
|
||||
rc = smbd_post_recv(sc, response);
|
||||
if (rc) {
|
||||
log_rdma_recv(ERR,
|
||||
"post_recv failed rc=%d\n", rc);
|
||||
|
|
@ -1241,9 +1239,8 @@ static int smbd_post_send_full_iter(struct smbd_connection *info,
|
|||
* The interaction is controlled by send/receive credit system
|
||||
*/
|
||||
static int smbd_post_recv(
|
||||
struct smbd_connection *info, struct smbdirect_recv_io *response)
|
||||
struct smbdirect_socket *sc, struct smbdirect_recv_io *response)
|
||||
{
|
||||
struct smbdirect_socket *sc = &info->socket;
|
||||
struct smbdirect_socket_parameters *sp = &sc->parameters;
|
||||
struct ib_recv_wr recv_wr;
|
||||
int rc = -EIO;
|
||||
|
|
@ -1288,7 +1285,7 @@ static int smbd_negotiate(struct smbd_connection *info)
|
|||
sc->status = SMBDIRECT_SOCKET_NEGOTIATE_RUNNING;
|
||||
|
||||
sc->recv_io.expected = SMBDIRECT_EXPECT_NEGOTIATE_REP;
|
||||
rc = smbd_post_recv(info, response);
|
||||
rc = smbd_post_recv(sc, response);
|
||||
log_rdma_event(INFO, "smbd_post_recv rc=%d iov.addr=0x%llx iov.length=%u iov.lkey=0x%x\n",
|
||||
rc, response->sge.addr,
|
||||
response->sge.length, response->sge.lkey);
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user