Lines Matching refs:work

135 int ksmbd_verify_smb_message(struct ksmbd_work *work)  in ksmbd_verify_smb_message()  argument
137 struct smb2_hdr *smb2_hdr = ksmbd_req_buf_next(work); in ksmbd_verify_smb_message()
141 return ksmbd_smb2_check_message(work); in ksmbd_verify_smb_message()
143 hdr = work->request_buf; in ksmbd_verify_smb_message()
146 work->conn->outstanding_credits++; in ksmbd_verify_smb_message()
310 static u16 get_smb1_cmd_val(struct ksmbd_work *work) in get_smb1_cmd_val() argument
321 static int init_smb1_rsp_hdr(struct ksmbd_work *work) in init_smb1_rsp_hdr() argument
323 struct smb_hdr *rsp_hdr = (struct smb_hdr *)work->response_buf; in init_smb1_rsp_hdr()
324 struct smb_hdr *rcv_hdr = (struct smb_hdr *)work->request_buf; in init_smb1_rsp_hdr()
342 static int smb1_check_user_session(struct ksmbd_work *work) in smb1_check_user_session() argument
344 unsigned int cmd = work->conn->ops->get_cmd_val(work); in smb1_check_user_session()
358 static int smb1_allocate_rsp_buf(struct ksmbd_work *work) in smb1_allocate_rsp_buf() argument
360 work->response_buf = kzalloc(MAX_CIFS_SMALL_BUFFER_SIZE, in smb1_allocate_rsp_buf()
362 work->response_sz = MAX_CIFS_SMALL_BUFFER_SIZE; in smb1_allocate_rsp_buf()
364 if (!work->response_buf) { in smb1_allocate_rsp_buf()
378 static void set_smb1_rsp_status(struct ksmbd_work *work, __le32 err) in set_smb1_rsp_status() argument
380 work->send_no_response = 1; in set_smb1_rsp_status()
391 static int smb1_negotiate(struct ksmbd_work *work) in smb1_negotiate() argument
393 return ksmbd_smb_negotiate_common(work, SMB_COM_NEGOTIATE); in smb1_negotiate()
408 int ksmbd_init_smb_server(struct ksmbd_work *work) in ksmbd_init_smb_server() argument
410 struct ksmbd_conn *conn = work->conn; in ksmbd_init_smb_server()
413 proto = *(__le32 *)((struct smb_hdr *)work->request_buf)->Protocol; in ksmbd_init_smb_server()
425 int ksmbd_populate_dot_dotdot_entries(struct ksmbd_work *work, int info_level, in ksmbd_populate_dot_dotdot_entries() argument
434 struct ksmbd_conn *conn = work->conn; in ksmbd_populate_dot_dotdot_entries()
460 ksmbd_vfs_fill_dentry_attrs(work, in ksmbd_populate_dot_dotdot_entries()
566 static int smb_handle_negotiate(struct ksmbd_work *work) in smb_handle_negotiate() argument
568 struct smb_negotiate_rsp *neg_rsp = work->response_buf; in smb_handle_negotiate()
572 if (ksmbd_iov_pin_rsp(work, (void *)neg_rsp, in smb_handle_negotiate()
578 neg_rsp->DialectIndex = cpu_to_le16(work->conn->dialect); in smb_handle_negotiate()
583 int ksmbd_smb_negotiate_common(struct ksmbd_work *work, unsigned int command) in ksmbd_smb_negotiate_common() argument
585 struct ksmbd_conn *conn = work->conn; in ksmbd_smb_negotiate_common()
589 ksmbd_negotiate_smb_dialect(work->request_buf); in ksmbd_smb_negotiate_common()
593 ret = smb2_handle_negotiate(work); in ksmbd_smb_negotiate_common()
600 init_smb2_neg_rsp(work); in ksmbd_smb_negotiate_common()
604 return smb_handle_negotiate(work); in ksmbd_smb_negotiate_common()
732 int ksmbd_override_fsids(struct ksmbd_work *work) in ksmbd_override_fsids() argument
734 struct ksmbd_session *sess = work->sess; in ksmbd_override_fsids()
735 struct ksmbd_share_config *share = work->tcon->share_conf; in ksmbd_override_fsids()
766 WARN_ON(work->saved_cred); in ksmbd_override_fsids()
767 work->saved_cred = override_creds(cred); in ksmbd_override_fsids()
768 if (!work->saved_cred) { in ksmbd_override_fsids()
775 void ksmbd_revert_fsids(struct ksmbd_work *work) in ksmbd_revert_fsids() argument
779 WARN_ON(!work->saved_cred); in ksmbd_revert_fsids()
782 revert_creds(work->saved_cred); in ksmbd_revert_fsids()
784 work->saved_cred = NULL; in ksmbd_revert_fsids()