mirror of
https://github.com/torvalds/linux.git
synced 2026-05-25 15:41:52 +02:00
smb: smbdirect: split out smbdirect_accept_negotiate_finish()
This will make it easier to support the listen/accept socket interfaces in the next steps. Cc: Steve French <smfrench@gmail.com> Cc: Tom Talpey <tom@talpey.com> Cc: Long Li <longli@microsoft.com> Cc: Namjae Jeon <linkinjeon@kernel.org> Cc: linux-cifs@vger.kernel.org Cc: samba-technical@lists.samba.org Signed-off-by: Stefan Metzmacher <metze@samba.org> Acked-by: Namjae Jeon <linkinjeon@kernel.org> Signed-off-by: Steve French <stfrench@microsoft.com>
This commit is contained in:
parent
4c9e665cb1
commit
84df3cde16
|
|
@ -301,12 +301,7 @@ static void smbdirect_accept_negotiate_recv_work(struct work_struct *work)
|
|||
u32 preferred_send_size;
|
||||
u32 max_receive_size;
|
||||
u32 max_fragmented_size;
|
||||
struct smbdirect_send_io *send_io = NULL;
|
||||
struct smbdirect_negotiate_resp *nrep;
|
||||
u32 ntstatus;
|
||||
int posted;
|
||||
u16 new_credits;
|
||||
int ret;
|
||||
|
||||
if (sc->first_error)
|
||||
return;
|
||||
|
|
@ -459,6 +454,25 @@ static void smbdirect_accept_negotiate_recv_work(struct work_struct *work)
|
|||
*/
|
||||
sp->max_fragmented_send_size = max_fragmented_size;
|
||||
|
||||
ntstatus = le32_to_cpu(STATUS_SUCCESS);
|
||||
|
||||
not_supported:
|
||||
smbdirect_accept_negotiate_finish(sc, ntstatus);
|
||||
}
|
||||
|
||||
void smbdirect_accept_negotiate_finish(struct smbdirect_socket *sc, u32 ntstatus)
|
||||
{
|
||||
const struct smbdirect_socket_parameters *sp = &sc->parameters;
|
||||
struct smbdirect_recv_io *recv_io;
|
||||
struct smbdirect_send_io *send_io;
|
||||
struct smbdirect_negotiate_resp *nrep;
|
||||
int posted;
|
||||
u16 new_credits;
|
||||
int ret;
|
||||
|
||||
if (ntstatus)
|
||||
goto not_supported;
|
||||
|
||||
/*
|
||||
* Prepare for receiving data_transfer messages
|
||||
*/
|
||||
|
|
@ -486,8 +500,6 @@ static void smbdirect_accept_negotiate_recv_work(struct work_struct *work)
|
|||
*/
|
||||
new_credits = smbdirect_connection_grant_recv_credits(sc);
|
||||
|
||||
ntstatus = le32_to_cpu(STATUS_SUCCESS);
|
||||
|
||||
not_supported:
|
||||
send_io = smbdirect_connection_alloc_send_io(sc);
|
||||
if (IS_ERR(send_io)) {
|
||||
|
|
|
|||
|
|
@ -132,4 +132,6 @@ int smbdirect_connection_create_mr_list(struct smbdirect_socket *sc);
|
|||
__SMBDIRECT_PRIVATE__
|
||||
void smbdirect_connection_destroy_mr_list(struct smbdirect_socket *sc);
|
||||
|
||||
void smbdirect_accept_negotiate_finish(struct smbdirect_socket *sc, u32 ntstatus);
|
||||
|
||||
#endif /* __FS_SMB_COMMON_SMBDIRECT_INTERNAL_H__ */
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user