/fs/smb/server/ |
D | ksmbd_work.c | 21 struct ksmbd_work *work = kmem_cache_zalloc(work_cache, GFP_KERNEL); in ksmbd_alloc_work_struct() local 23 if (work) { in ksmbd_alloc_work_struct() 24 work->compound_fid = KSMBD_NO_FID; in ksmbd_alloc_work_struct() 25 work->compound_pfid = KSMBD_NO_FID; in ksmbd_alloc_work_struct() 26 INIT_LIST_HEAD(&work->request_entry); in ksmbd_alloc_work_struct() 27 INIT_LIST_HEAD(&work->async_request_entry); in ksmbd_alloc_work_struct() 28 INIT_LIST_HEAD(&work->fp_entry); in ksmbd_alloc_work_struct() 29 INIT_LIST_HEAD(&work->interim_entry); in ksmbd_alloc_work_struct() 30 INIT_LIST_HEAD(&work->aux_read_list); in ksmbd_alloc_work_struct() 31 work->iov_alloc_cnt = 4; in ksmbd_alloc_work_struct() [all …]
|
D | server.c | 92 static inline int check_conn_state(struct ksmbd_work *work) in check_conn_state() argument 96 if (ksmbd_conn_exiting(work->conn) || in check_conn_state() 97 ksmbd_conn_need_reconnect(work->conn)) { in check_conn_state() 98 rsp_hdr = work->response_buf; in check_conn_state() 108 static int __process_request(struct ksmbd_work *work, struct ksmbd_conn *conn, in __process_request() argument 115 if (check_conn_state(work)) in __process_request() 118 if (ksmbd_verify_smb_message(work)) { in __process_request() 119 conn->ops->set_rsp_status(work, STATUS_INVALID_PARAMETER); in __process_request() 123 command = conn->ops->get_cmd_val(work); in __process_request() 128 conn->ops->set_rsp_status(work, STATUS_INVALID_PARAMETER); in __process_request() [all …]
|
D | smb2pdu.h | 469 bool is_smb2_neg_cmd(struct ksmbd_work *work); 470 bool is_smb2_rsp(struct ksmbd_work *work); 472 u16 get_smb2_cmd_val(struct ksmbd_work *work); 473 void set_smb2_rsp_status(struct ksmbd_work *work, __le32 err); 474 int init_smb2_rsp_hdr(struct ksmbd_work *work); 475 int smb2_allocate_rsp_buf(struct ksmbd_work *work); 476 bool is_chained_smb2_message(struct ksmbd_work *work); 477 int init_smb2_neg_rsp(struct ksmbd_work *work); 478 void smb2_set_err_rsp(struct ksmbd_work *work); 479 int smb2_check_user_session(struct ksmbd_work *work); [all …]
|
D | smb2pdu.c | 41 static void __wbuf(struct ksmbd_work *work, void **req, void **rsp) in __wbuf() argument 43 if (work->next_smb2_rcv_hdr_off) { in __wbuf() 44 *req = ksmbd_req_buf_next(work); in __wbuf() 45 *rsp = ksmbd_resp_buf_next(work); in __wbuf() 47 *req = smb2_get_msg(work->request_buf); in __wbuf() 48 *rsp = smb2_get_msg(work->response_buf); in __wbuf() 87 int smb2_get_ksmbd_tcon(struct ksmbd_work *work) in smb2_get_ksmbd_tcon() argument 89 struct smb2_hdr *req_hdr = ksmbd_req_buf_next(work); in smb2_get_ksmbd_tcon() 100 if (xa_empty(&work->sess->tree_conns)) { in smb2_get_ksmbd_tcon() 111 if (work->next_smb2_rcv_hdr_off) { in smb2_get_ksmbd_tcon() [all …]
|
D | smb_common.c | 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 [all …]
|
D | ksmbd_work.h | 86 struct work_struct work; member 99 static inline void *ksmbd_resp_buf_next(struct ksmbd_work *work) in ksmbd_resp_buf_next() argument 101 return work->response_buf + work->next_smb2_rsp_hdr_off + 4; in ksmbd_resp_buf_next() 108 static inline void *ksmbd_resp_buf_curr(struct ksmbd_work *work) in ksmbd_resp_buf_curr() argument 110 return work->response_buf + work->curr_smb2_rsp_hdr_off + 4; in ksmbd_resp_buf_curr() 117 static inline void *ksmbd_req_buf_next(struct ksmbd_work *work) in ksmbd_req_buf_next() argument 119 return work->request_buf + work->next_smb2_rcv_hdr_off + 4; in ksmbd_req_buf_next() 123 void ksmbd_free_work_struct(struct ksmbd_work *work); 130 bool ksmbd_queue_work(struct ksmbd_work *work); 131 int ksmbd_iov_pin_rsp_read(struct ksmbd_work *work, void *ib, int len, [all …]
|
D | vfs_cache.c | 360 static void __put_fd_final(struct ksmbd_work *work, struct ksmbd_file *fp) in __put_fd_final() argument 362 __ksmbd_close_fd(&work->sess->file_table, fp); in __put_fd_final() 363 atomic_dec(&work->conn->stats.open_files_count); in __put_fd_final() 379 int ksmbd_close_fd(struct ksmbd_work *work, u64 id) in ksmbd_close_fd() argument 387 ft = &work->sess->file_table; in ksmbd_close_fd() 406 __put_fd_final(work, fp); in ksmbd_close_fd() 410 void ksmbd_fd_put(struct ksmbd_work *work, struct ksmbd_file *fp) in ksmbd_fd_put() argument 417 __put_fd_final(work, fp); in ksmbd_fd_put() 429 struct ksmbd_file *ksmbd_lookup_foreign_fd(struct ksmbd_work *work, u64 id) in ksmbd_lookup_foreign_fd() argument 431 return __ksmbd_lookup_fd(&work->sess->file_table, id); in ksmbd_lookup_foreign_fd() [all …]
|
D | connection.c | 112 void ksmbd_conn_enqueue_request(struct ksmbd_work *work) in ksmbd_conn_enqueue_request() argument 114 struct ksmbd_conn *conn = work->conn; in ksmbd_conn_enqueue_request() 117 if (conn->ops->get_cmd_val(work) != SMB2_CANCEL_HE) in ksmbd_conn_enqueue_request() 123 list_add_tail(&work->request_entry, requests_queue); in ksmbd_conn_enqueue_request() 128 void ksmbd_conn_try_dequeue_request(struct ksmbd_work *work) in ksmbd_conn_try_dequeue_request() argument 130 struct ksmbd_conn *conn = work->conn; in ksmbd_conn_try_dequeue_request() 132 if (list_empty(&work->request_entry) && in ksmbd_conn_try_dequeue_request() 133 list_empty(&work->async_request_entry)) in ksmbd_conn_try_dequeue_request() 138 list_del_init(&work->request_entry); in ksmbd_conn_try_dequeue_request() 140 if (work->asynchronous) in ksmbd_conn_try_dequeue_request() [all …]
|
D | vfs.h | 77 int ksmbd_vfs_create(struct ksmbd_work *work, const char *name, umode_t mode); 78 int ksmbd_vfs_mkdir(struct ksmbd_work *work, const char *name, umode_t mode); 79 int ksmbd_vfs_read(struct ksmbd_work *work, struct ksmbd_file *fp, size_t count, 81 int ksmbd_vfs_write(struct ksmbd_work *work, struct ksmbd_file *fp, 84 int ksmbd_vfs_fsync(struct ksmbd_work *work, u64 fid, u64 p_id); 85 int ksmbd_vfs_remove_file(struct ksmbd_work *work, const struct path *path); 86 int ksmbd_vfs_link(struct ksmbd_work *work, 89 int ksmbd_vfs_rename(struct ksmbd_work *work, const struct path *old_path, 91 int ksmbd_vfs_truncate(struct ksmbd_work *work, 94 int ksmbd_vfs_copy_file_ranges(struct ksmbd_work *work, [all …]
|
D | oplock.c | 30 static struct oplock_info *alloc_opinfo(struct ksmbd_work *work, in alloc_opinfo() argument 33 struct ksmbd_conn *conn = work->conn; in alloc_opinfo() 34 struct ksmbd_session *sess = work->sess; in alloc_opinfo() 639 struct ksmbd_work *work = container_of(wk, struct ksmbd_work, work); in __smb2_oplock_break_noti() local 640 struct oplock_break_info *br_info = work->request_buf; in __smb2_oplock_break_noti() 648 if (allocate_interim_rsp_buf(work)) { in __smb2_oplock_break_noti() 650 ksmbd_fd_put(work, fp); in __smb2_oplock_break_noti() 654 rsp_hdr = smb2_get_msg(work->response_buf); in __smb2_oplock_break_noti() 668 rsp = smb2_get_msg(work->response_buf); in __smb2_oplock_break_noti() 682 ksmbd_fd_put(work, fp); in __smb2_oplock_break_noti() [all …]
|
D | smb_common.h | 402 int (*allocate_rsp_buf)(struct ksmbd_work *work); 403 int (*set_rsp_credits)(struct ksmbd_work *work); 404 int (*check_user_session)(struct ksmbd_work *work); 405 int (*get_ksmbd_tcon)(struct ksmbd_work *work); 406 bool (*is_sign_req)(struct ksmbd_work *work, unsigned int command); 407 int (*check_sign_req)(struct ksmbd_work *work); 408 void (*set_sign_rsp)(struct ksmbd_work *work); 412 int (*decrypt_req)(struct ksmbd_work *work); 413 int (*encrypt_resp)(struct ksmbd_work *work); 425 int ksmbd_verify_smb_message(struct ksmbd_work *work); [all …]
|
D | vfs_cache.h | 136 int ksmbd_close_fd(struct ksmbd_work *work, u64 id); 137 struct ksmbd_file *ksmbd_lookup_fd_fast(struct ksmbd_work *work, u64 id); 138 struct ksmbd_file *ksmbd_lookup_foreign_fd(struct ksmbd_work *work, u64 id); 139 struct ksmbd_file *ksmbd_lookup_fd_slow(struct ksmbd_work *work, u64 id, 141 void ksmbd_fd_put(struct ksmbd_work *work, struct ksmbd_file *fp); 148 struct ksmbd_file *ksmbd_open_fd(struct ksmbd_work *work, struct file *filp); 149 void ksmbd_close_tree_conn_fds(struct ksmbd_work *work); 150 void ksmbd_close_session_fds(struct ksmbd_work *work); 151 int ksmbd_close_inode_fds(struct ksmbd_work *work, struct inode *inode);
|
D | vfs.c | 40 static void ksmbd_vfs_inherit_owner(struct ksmbd_work *work, in ksmbd_vfs_inherit_owner() argument 44 if (!test_share_config_flag(work->tcon->share_conf, in ksmbd_vfs_inherit_owner() 169 int ksmbd_vfs_create(struct ksmbd_work *work, const char *name, umode_t mode) in ksmbd_vfs_create() argument 175 dentry = ksmbd_vfs_kern_path_create(work, name, in ksmbd_vfs_create() 189 ksmbd_vfs_inherit_owner(work, d_inode(path.dentry), in ksmbd_vfs_create() 207 int ksmbd_vfs_mkdir(struct ksmbd_work *work, const char *name, umode_t mode) in ksmbd_vfs_mkdir() argument 214 dentry = ksmbd_vfs_kern_path_create(work, name, in ksmbd_vfs_mkdir() 243 ksmbd_vfs_inherit_owner(work, d_inode(path.dentry), d_inode(d)); in ksmbd_vfs_mkdir() 371 int ksmbd_vfs_read(struct ksmbd_work *work, struct ksmbd_file *fp, size_t count, in ksmbd_vfs_read() argument 384 if (work->conn->connection_type) { in ksmbd_vfs_read() [all …]
|
D | smb2misc.c | 356 int ksmbd_smb2_check_message(struct ksmbd_work *work) in ksmbd_smb2_check_message() argument 358 struct smb2_pdu *pdu = ksmbd_req_buf_next(work); in ksmbd_smb2_check_message() 362 __u32 len = get_rfc1002_len(work->request_buf); in ksmbd_smb2_check_message() 365 if ((u64)work->next_smb2_rcv_hdr_off + next_cmd > len) { in ksmbd_smb2_check_message() 373 else if (work->next_smb2_rcv_hdr_off) in ksmbd_smb2_check_message() 374 len -= work->next_smb2_rcv_hdr_off; in ksmbd_smb2_check_message() 451 if ((work->conn->vals->capabilities & SMB2_GLOBAL_CAP_LARGE_MTU) && in ksmbd_smb2_check_message() 452 smb2_validate_credit_charge(work->conn, hdr)) in ksmbd_smb2_check_message() 458 int smb2_negotiate_request(struct ksmbd_work *work) in smb2_negotiate_request() argument 460 return ksmbd_smb_negotiate_common(work, SMB2_NEGOTIATE_HE); in smb2_negotiate_request()
|
/fs/btrfs/ |
D | async-thread.c | 55 struct btrfs_fs_info * __pure btrfs_work_owner(const struct btrfs_work *work) in btrfs_work_owner() argument 57 return work->wq->fs_info; in btrfs_work_owner() 180 struct btrfs_work *work; in run_ordered_work() local 189 work = list_entry(list->next, struct btrfs_work, in run_ordered_work() 191 if (!test_bit(WORK_DONE_BIT, &work->flags)) in run_ordered_work() 207 if (test_and_set_bit(WORK_ORDER_DONE_BIT, &work->flags)) in run_ordered_work() 209 trace_btrfs_ordered_sched(work); in run_ordered_work() 211 work->ordered_func(work); in run_ordered_work() 215 list_del(&work->ordered_list); in run_ordered_work() 218 if (work == self) { in run_ordered_work() [all …]
|
D | discard.c | 327 cancel_delayed_work_sync(&discard_ctl->work); in btrfs_discard_cancel_work() 350 if (!delayed_work_pending(&discard_ctl->work)) in btrfs_discard_queue_work() 361 if (!override && delayed_work_pending(&discard_ctl->work)) in __btrfs_discard_schedule_work() 402 &discard_ctl->work, nsecs_to_jiffies(delay)); in __btrfs_discard_schedule_work() 458 static void btrfs_discard_workfn(struct work_struct *work) in btrfs_discard_workfn() argument 468 discard_ctl = container_of(work, struct btrfs_discard_ctl, work.work); in btrfs_discard_workfn() 735 INIT_DELAYED_WORK(&discard_ctl->work, btrfs_discard_workfn); in btrfs_discard_init() 756 cancel_delayed_work_sync(&fs_info->discard_ctl.work); in btrfs_discard_cleanup()
|
/fs/ |
D | fs-writeback.c | 144 struct wb_writeback_work *work) in finish_writeback_work() argument 146 struct wb_completion *done = work->done; in finish_writeback_work() 148 if (work->auto_free) in finish_writeback_work() 149 kfree(work); in finish_writeback_work() 160 struct wb_writeback_work *work) in wb_queue_work() argument 162 trace_writeback_queue(wb, work); in wb_queue_work() 164 if (work->done) in wb_queue_work() 165 atomic_inc(&work->done->cnt); in wb_queue_work() 170 list_add_tail(&work->list, &wb->work_list); in wb_queue_work() 173 finish_writeback_work(wb, work); in wb_queue_work() [all …]
|
D | sync.c | 117 static void do_sync_work(struct work_struct *work) in do_sync_work() argument 132 kfree(work); in do_sync_work() 137 struct work_struct *work; in emergency_sync() local 139 work = kmalloc(sizeof(*work), GFP_ATOMIC); in emergency_sync() 140 if (work) { in emergency_sync() 141 INIT_WORK(work, do_sync_work); in emergency_sync() 142 schedule_work(work); in emergency_sync()
|
/fs/afs/ |
D | cmservice.c | 39 .work = SRXAFSCB_CallBack, 49 .work = SRXAFSCB_InitCallBackState, 59 .work = SRXAFSCB_InitCallBackState, 69 .work = SRXAFSCB_Probe, 79 .work = SRXAFSCB_ProbeUuid, 89 .work = SRXAFSCB_TellMeAboutYourself, 99 .work = SRXAFSCB_CallBack, 204 static void SRXAFSCB_CallBack(struct work_struct *work) in SRXAFSCB_CallBack() argument 206 struct afs_call *call = container_of(work, struct afs_call, work); in SRXAFSCB_CallBack() 331 static void SRXAFSCB_InitCallBackState(struct work_struct *work) in SRXAFSCB_InitCallBackState() argument [all …]
|
/fs/ext4/ |
D | readpage.c | 65 struct work_struct work; member 92 static void decrypt_work(struct work_struct *work) in decrypt_work() argument 95 container_of(work, struct bio_post_read_ctx, work); in decrypt_work() 104 static void verity_work(struct work_struct *work) in verity_work() argument 107 container_of(work, struct bio_post_read_ctx, work); in verity_work() 136 INIT_WORK(&ctx->work, decrypt_work); in bio_post_read_processing() 137 fscrypt_enqueue_decrypt_work(&ctx->work); in bio_post_read_processing() 144 INIT_WORK(&ctx->work, verity_work); in bio_post_read_processing() 145 fsverity_enqueue_verify_work(&ctx->work); in bio_post_read_processing()
|
/fs/xfs/ |
D | xfs_pwork.c | 39 struct work_struct *work) in xfs_pwork_work() argument 45 pwork = container_of(work, struct xfs_pwork, work); in xfs_pwork_work() 94 INIT_WORK(&pwork->work, xfs_pwork_work); in xfs_pwork_queue() 97 queue_work(pctl->wq, &pwork->work); in xfs_pwork_queue()
|
D | xfs_mru_cache.c | 101 struct delayed_work work; /* Workqueue data for reaping. */ member 206 queue_delayed_work(xfs_mru_reap_wq, &mru->work, in _xfs_mru_cache_list_insert() 266 struct work_struct *work) in _xfs_mru_cache_reap() argument 269 container_of(work, struct xfs_mru_cache, work.work); in _xfs_mru_cache_reap() 287 queue_delayed_work(xfs_mru_reap_wq, &mru->work, next); in _xfs_mru_cache_reap() 358 INIT_DELAYED_WORK(&mru->work, _xfs_mru_cache_reap); in xfs_mru_cache_create() 390 cancel_delayed_work_sync(&mru->work); in xfs_mru_cache_flush()
|
/fs/netfs/ |
D | objects.c | 73 static void netfs_free_request(struct work_struct *work) in netfs_free_request() argument 76 container_of(work, struct netfs_io_request, work); in netfs_free_request() 99 rreq->work.func = netfs_free_request; in netfs_put_request() 100 if (!queue_work(system_unbound_wq, &rreq->work)) in netfs_put_request() 103 netfs_free_request(&rreq->work); in netfs_put_request()
|
D | io.c | 227 static void netfs_rreq_write_to_cache_work(struct work_struct *work) in netfs_rreq_write_to_cache_work() argument 230 container_of(work, struct netfs_io_request, work); in netfs_rreq_write_to_cache_work() 237 rreq->work.func = netfs_rreq_write_to_cache_work; in netfs_rreq_write_to_cache() 238 if (!queue_work(system_unbound_wq, &rreq->work)) in netfs_rreq_write_to_cache() 354 static void netfs_rreq_work(struct work_struct *work) in netfs_rreq_work() argument 357 container_of(work, struct netfs_io_request, work); in netfs_rreq_work() 370 if (!queue_work(system_unbound_wq, &rreq->work)) in netfs_rreq_terminated() 618 INIT_WORK(&rreq->work, netfs_rreq_work); in netfs_begin_read()
|
/fs/ocfs2/cluster/ |
D | tcp.c | 122 static void o2net_sc_connect_completed(struct work_struct *work); 123 static void o2net_rx_until_empty(struct work_struct *work); 124 static void o2net_shutdown_sc(struct work_struct *work); 126 static void o2net_sc_send_keep_req(struct work_struct *work); 458 struct work_struct *work) in o2net_sc_queue_work() argument 461 if (!queue_work(o2net_wq, work)) in o2net_sc_queue_work() 465 struct delayed_work *work, in o2net_sc_queue_delayed_work() argument 469 if (!queue_delayed_work(o2net_wq, work, delay)) in o2net_sc_queue_delayed_work() 473 struct delayed_work *work) in o2net_sc_cancel_delayed_work() argument 475 if (cancel_delayed_work(work)) in o2net_sc_cancel_delayed_work() [all …]
|