mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-05-14 15:55:28 -04:00
smb: client: pass struct smbdirect_socket to smbd_post_send_iter()
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:
committed by
Steve French
parent
8cead970e3
commit
46b8fe2bd1
@@ -1038,11 +1038,10 @@ static int smbd_post_send(struct smbdirect_socket *sc,
|
||||
return rc;
|
||||
}
|
||||
|
||||
static int smbd_post_send_iter(struct smbd_connection *info,
|
||||
static int smbd_post_send_iter(struct smbdirect_socket *sc,
|
||||
struct iov_iter *iter,
|
||||
int *_remaining_data_length)
|
||||
{
|
||||
struct smbdirect_socket *sc = &info->socket;
|
||||
struct smbdirect_socket_parameters *sp = &sc->parameters;
|
||||
int i, rc;
|
||||
int header_length;
|
||||
@@ -1206,13 +1205,14 @@ static int smbd_post_send_empty(struct smbd_connection *info)
|
||||
int remaining_data_length = 0;
|
||||
|
||||
sc->statistics.send_empty++;
|
||||
return smbd_post_send_iter(info, NULL, &remaining_data_length);
|
||||
return smbd_post_send_iter(sc, NULL, &remaining_data_length);
|
||||
}
|
||||
|
||||
static int smbd_post_send_full_iter(struct smbd_connection *info,
|
||||
struct iov_iter *iter,
|
||||
int *_remaining_data_length)
|
||||
{
|
||||
struct smbdirect_socket *sc = &info->socket;
|
||||
int rc = 0;
|
||||
|
||||
/*
|
||||
@@ -1222,7 +1222,7 @@ static int smbd_post_send_full_iter(struct smbd_connection *info,
|
||||
*/
|
||||
|
||||
while (iov_iter_count(iter) > 0) {
|
||||
rc = smbd_post_send_iter(info, iter, _remaining_data_length);
|
||||
rc = smbd_post_send_iter(sc, iter, _remaining_data_length);
|
||||
if (rc < 0)
|
||||
break;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user