Home
last modified time | relevance | path

Searched refs:task (Results 1 – 25 of 62) sorted by relevance

123

/fs/proc/
Dbase.c174 static int get_task_root(struct task_struct *task, struct path *root) in get_task_root() argument
178 task_lock(task); in get_task_root()
179 if (task->fs) { in get_task_root()
180 get_fs_root(task->fs, root); in get_task_root()
183 task_unlock(task); in get_task_root()
189 struct task_struct *task = get_proc_task(d_inode(dentry)); in proc_cwd_link() local
192 if (task) { in proc_cwd_link()
193 task_lock(task); in proc_cwd_link()
194 if (task->fs) { in proc_cwd_link()
195 get_fs_pwd(task->fs, path); in proc_cwd_link()
[all …]
Dfd.c26 struct task_struct *task; in seq_show() local
28 task = get_proc_task(m->private); in seq_show()
29 if (!task) in seq_show()
32 task_lock(task); in seq_show()
33 files = task->files; in seq_show()
51 task_unlock(task); in seq_show()
52 put_task_struct(task); in seq_show()
78 struct task_struct *task = get_proc_task(inode); in proc_fdinfo_access_allowed() local
80 if (!task) in proc_fdinfo_access_allowed()
83 allowed = ptrace_may_access(task, PTRACE_MODE_READ_FSCREDS); in proc_fdinfo_access_allowed()
[all …]
Darray.c408 static void task_cpus_allowed(struct seq_file *m, struct task_struct *task) in task_cpus_allowed() argument
411 cpumask_pr_args(&task->cpus_mask)); in task_cpus_allowed()
413 cpumask_pr_args(&task->cpus_mask)); in task_cpus_allowed()
416 static inline void task_core_dumping(struct seq_file *m, struct task_struct *task) in task_core_dumping() argument
418 seq_put_decimal_ull(m, "CoreDumping:\t", !!task->signal->core_state); in task_core_dumping()
432 struct pid *pid, struct task_struct *task) in proc_pid_status() argument
434 struct mm_struct *mm = get_task_mm(task); in proc_pid_status()
437 proc_task_name(m, task, true); in proc_pid_status()
440 task_state(m, ns, pid, task); in proc_pid_status()
444 task_core_dumping(m, task); in proc_pid_status()
[all …]
Dnamespaces.c47 struct task_struct *task; in proc_ns_get_link() local
54 task = get_proc_task(inode); in proc_ns_get_link()
55 if (!task) in proc_ns_get_link()
58 if (!ptrace_may_access(task, PTRACE_MODE_READ_FSCREDS)) in proc_ns_get_link()
61 error = ns_get_path(&ns_path, task, ns_ops); in proc_ns_get_link()
67 put_task_struct(task); in proc_ns_get_link()
75 struct task_struct *task; in proc_ns_readlink() local
79 task = get_proc_task(inode); in proc_ns_readlink()
80 if (!task) in proc_ns_readlink()
83 if (ptrace_may_access(task, PTRACE_MODE_READ_FSCREDS)) { in proc_ns_readlink()
[all …]
Dtask_nommu.c216 priv->task = get_proc_task(priv->inode); in m_start()
217 if (!priv->task) in m_start()
222 put_task_struct(priv->task); in m_start()
223 priv->task = NULL; in m_start()
229 put_task_struct(priv->task); in m_start()
230 priv->task = NULL; in m_start()
244 if (!priv->task) in m_stop()
249 put_task_struct(priv->task); in m_stop()
250 priv->task = NULL; in m_stop()
Dproc_net.c269 struct task_struct *task; in get_proc_task_net() local
274 task = pid_task(proc_pid(dir), PIDTYPE_PID); in get_proc_task_net()
275 if (task != NULL) { in get_proc_task_net()
276 task_lock(task); in get_proc_task_net()
277 ns = task->nsproxy; in get_proc_task_net()
280 task_unlock(task); in get_proc_task_net()
Dtask_mmu.c107 struct task_struct *task = priv->task; in hold_task_mempolicy() local
109 task_lock(task); in hold_task_mempolicy()
110 priv->task_mempolicy = get_task_policy(task); in hold_task_mempolicy()
112 task_unlock(task); in hold_task_mempolicy()
152 priv->task = get_proc_task(priv->inode); in m_start()
153 if (!priv->task) in m_start()
158 put_task_struct(priv->task); in m_start()
159 priv->task = NULL; in m_start()
165 put_task_struct(priv->task); in m_start()
166 priv->task = NULL; in m_start()
[all …]
/fs/nfs/filelayout/
Dfilelayout.c91 struct rpc_task *task = &hdr->task; in filelayout_reset_write() local
96 hdr->task.tk_pid, in filelayout_reset_write()
102 task->tk_status = pnfs_write_done_resend_to_mds(hdr); in filelayout_reset_write()
108 struct rpc_task *task = &hdr->task; in filelayout_reset_read() local
113 hdr->task.tk_pid, in filelayout_reset_read()
119 task->tk_status = pnfs_read_done_resend_to_mds(hdr); in filelayout_reset_read()
123 static int filelayout_async_handle_error(struct rpc_task *task, in filelayout_async_handle_error() argument
133 if (task->tk_status >= 0) in filelayout_async_handle_error()
136 switch (task->tk_status) { in filelayout_async_handle_error()
146 "flags 0x%x\n", __func__, task->tk_status, in filelayout_async_handle_error()
[all …]
/fs/nfs/flexfilelayout/
Dflexfilelayout.c41 static void ff_layout_read_record_layoutstats_done(struct rpc_task *task,
676 nfs4_ff_layout_stat_io_end_read(struct rpc_task *task, in nfs4_ff_layout_stat_io_end_read() argument
684 ktime_get(), task->tk_start); in nfs4_ff_layout_stat_io_end_read()
707 nfs4_ff_layout_stat_io_end_write(struct rpc_task *task, in nfs4_ff_layout_stat_io_end_write() argument
718 requested, completed, ktime_get(), task->tk_start); in nfs4_ff_layout_stat_io_end_write()
1013 struct rpc_task *task = &hdr->task; in ff_layout_reset_write() local
1020 hdr->task.tk_pid, in ff_layout_reset_write()
1033 hdr->task.tk_pid, in ff_layout_reset_write()
1043 task->tk_status = pnfs_write_done_resend_to_mds(hdr); in ff_layout_reset_write()
1061 struct rpc_task *task = &hdr->task; in ff_layout_reset_read() local
[all …]
/fs/nfs/
Dunlink.c46 static void nfs_async_unlink_done(struct rpc_task *task, void *calldata) in nfs_async_unlink_done() argument
51 trace_nfs_sillyrename_unlink(data, task->tk_status); in nfs_async_unlink_done()
52 if (!NFS_PROTO(dir)->unlink_done(task, dir)) in nfs_async_unlink_done()
53 rpc_restart_call_prepare(task); in nfs_async_unlink_done()
76 static void nfs_unlink_prepare(struct rpc_task *task, void *calldata) in nfs_unlink_prepare() argument
80 NFS_PROTO(dir)->unlink_rpc_prepare(task, data); in nfs_unlink_prepare()
103 struct rpc_task *task; in nfs_do_call_unlink() local
116 task = rpc_run_task(&task_setup_data); in nfs_do_call_unlink()
117 if (!IS_ERR(task)) in nfs_do_call_unlink()
118 rpc_put_task_async(task); in nfs_do_call_unlink()
[all …]
Dnfs4proc.c620 nfs4_async_handle_exception(struct rpc_task *task, struct nfs_server *server, in nfs4_async_handle_exception() argument
628 rpc_delay(task, nfs4_update_delay(&exception->timeout)); in nfs4_async_handle_exception()
634 rpc_sleep_on(&clp->cl_rpcwaitq, task, NULL); in nfs4_async_handle_exception()
636 rpc_wake_up_queued_task(&clp->cl_rpcwaitq, task); in nfs4_async_handle_exception()
650 rpc_task_release_transport(task); in nfs4_async_handle_exception()
656 nfs4_async_handle_error(struct rpc_task *task, struct nfs_server *server, in nfs4_async_handle_error() argument
663 if (task->tk_status >= 0) in nfs4_async_handle_error()
667 task->tk_status = nfs4_async_handle_exception(task, server, in nfs4_async_handle_error()
668 task->tk_status, in nfs4_async_handle_error()
734 static int nfs40_sequence_done(struct rpc_task *task, in nfs40_sequence_done() argument
[all …]
Dnfs3proc.c49 nfs3_async_handle_jukebox(struct rpc_task *task, struct inode *inode) in nfs3_async_handle_jukebox() argument
51 if (task->tk_status != -EJUKEBOX) in nfs3_async_handle_jukebox()
54 task->tk_status = 0; in nfs3_async_handle_jukebox()
55 rpc_restart_call(task); in nfs3_async_handle_jukebox()
56 rpc_delay(task, NFS_JUKEBOX_RETRY_TIME); in nfs3_async_handle_jukebox()
468 static void nfs3_proc_unlink_rpc_prepare(struct rpc_task *task, struct nfs_unlinkdata *data) in nfs3_proc_unlink_rpc_prepare() argument
470 rpc_call_start(task); in nfs3_proc_unlink_rpc_prepare()
474 nfs3_proc_unlink_done(struct rpc_task *task, struct inode *dir) in nfs3_proc_unlink_done() argument
477 if (nfs3_async_handle_jukebox(task, dir)) in nfs3_proc_unlink_done()
479 res = task->tk_msg.rpc_resp; in nfs3_proc_unlink_done()
[all …]
Dnfs42proc.c506 static void nfs42_offload_cancel_prepare(struct rpc_task *task, void *calldata) in nfs42_offload_cancel_prepare() argument
512 &data->res.osr_seq_res, task); in nfs42_offload_cancel_prepare()
515 static void nfs42_offload_cancel_done(struct rpc_task *task, void *calldata) in nfs42_offload_cancel_done() argument
519 trace_nfs4_offload_cancel(&data->args, task->tk_status); in nfs42_offload_cancel_done()
520 nfs41_sequence_done(task, &data->res.osr_seq_res); in nfs42_offload_cancel_done()
521 if (task->tk_status && in nfs42_offload_cancel_done()
522 nfs4_async_handle_error(task, data->seq_server, NULL, in nfs42_offload_cancel_done()
524 rpc_restart_call_prepare(task); in nfs42_offload_cancel_done()
544 struct rpc_task *task; in nfs42_do_offload_cancel_async() local
574 task = rpc_run_task(&task_setup_data); in nfs42_do_offload_cancel_async()
[all …]
Dread.c229 static int nfs_readpage_done(struct rpc_task *task, in nfs_readpage_done() argument
233 int status = NFS_PROTO(inode)->read_done(task, hdr); in nfs_readpage_done()
238 trace_nfs_readpage_done(task, hdr); in nfs_readpage_done()
240 if (task->tk_status == -ESTALE) { in nfs_readpage_done()
247 static void nfs_readpage_retry(struct rpc_task *task, in nfs_readpage_retry() argument
255 trace_nfs_readpage_short(task, hdr); in nfs_readpage_retry()
264 if (!task->tk_ops) { in nfs_readpage_retry()
276 rpc_restart_call_prepare(task); in nfs_readpage_retry()
279 static void nfs_readpage_result(struct rpc_task *task, in nfs_readpage_result() argument
292 nfs_readpage_retry(task, hdr); in nfs_readpage_result()
Dproc.c342 static void nfs_proc_unlink_rpc_prepare(struct rpc_task *task, struct nfs_unlinkdata *data) in nfs_proc_unlink_rpc_prepare() argument
344 rpc_call_start(task); in nfs_proc_unlink_rpc_prepare()
347 static int nfs_proc_unlink_done(struct rpc_task *task, struct inode *dir) in nfs_proc_unlink_done() argument
361 static void nfs_proc_rename_rpc_prepare(struct rpc_task *task, struct nfs_renamedata *data) in nfs_proc_rename_rpc_prepare() argument
363 rpc_call_start(task); in nfs_proc_rename_rpc_prepare()
367 nfs_proc_rename_done(struct rpc_task *task, struct inode *old_dir, in nfs_proc_rename_done() argument
597 static int nfs_read_done(struct rpc_task *task, struct nfs_pgio_header *hdr) in nfs_read_done() argument
602 if (task->tk_status >= 0) { in nfs_read_done()
620 static int nfs_proc_pgio_rpc_prepare(struct rpc_task *task, in nfs_proc_pgio_rpc_prepare() argument
623 rpc_call_start(task); in nfs_proc_pgio_rpc_prepare()
[all …]
Dpagelist.c132 nfs_async_iocounter_wait(struct rpc_task *task, struct nfs_lock_context *l_ctx) in nfs_async_iocounter_wait() argument
138 rpc_sleep_on(&NFS_SERVER(inode)->uoc_rpcwaitq, task, NULL); in nfs_async_iocounter_wait()
143 rpc_wake_up_queued_task(&NFS_SERVER(inode)->uoc_rpcwaitq, task); in nfs_async_iocounter_wait()
741 static void nfs_pgio_prepare(struct rpc_task *task, void *calldata) in nfs_pgio_prepare() argument
745 err = NFS_PROTO(hdr->inode)->pgio_rpc_prepare(task, hdr); in nfs_pgio_prepare()
747 rpc_exit(task, err); in nfs_pgio_prepare()
754 struct rpc_task *task; in nfs_initiate_pgio() local
762 .task = &hdr->task, in nfs_initiate_pgio()
782 task = rpc_run_task(&task_setup_data); in nfs_initiate_pgio()
783 if (IS_ERR(task)) in nfs_initiate_pgio()
[all …]
Dwrite.c1492 void nfs_commit_prepare(struct rpc_task *task, void *calldata) in nfs_commit_prepare() argument
1496 NFS_PROTO(data->inode)->commit_rpc_prepare(task, data); in nfs_commit_prepare()
1535 static int nfs_writeback_done(struct rpc_task *task, in nfs_writeback_done() argument
1548 status = NFS_PROTO(inode)->write_done(task, hdr); in nfs_writeback_done()
1553 trace_nfs_writeback_done(task, hdr); in nfs_writeback_done()
1555 if (task->tk_status >= 0) { in nfs_writeback_done()
1601 static void nfs_writeback_result(struct rpc_task *task, in nfs_writeback_result() argument
1622 task->tk_status = -EIO; in nfs_writeback_result()
1627 if (!task->tk_ops) { in nfs_writeback_result()
1647 rpc_restart_call_prepare(task); in nfs_writeback_result()
[all …]
/fs/lockd/
Dclntproc.c369 struct rpc_task *task; in nlm_do_async_call() local
371 task = __nlm_async_call(req, proc, msg, tk_ops); in nlm_do_async_call()
372 if (IS_ERR(task)) in nlm_do_async_call()
373 return PTR_ERR(task); in nlm_do_async_call()
374 rpc_put_task(task); in nlm_do_async_call()
413 struct rpc_task *task; in nlmclnt_async_call() local
416 task = __nlm_async_call(req, proc, &msg, tk_ops); in nlmclnt_async_call()
417 if (IS_ERR(task)) in nlmclnt_async_call()
418 return PTR_ERR(task); in nlmclnt_async_call()
419 err = rpc_wait_for_completion_task(task); in nlmclnt_async_call()
[all …]
Dclntlock.c216 struct task_struct *task; in nlmclnt_recovery() local
220 task = kthread_run(reclaimer, host, "%s-reclaim", host->h_name); in nlmclnt_recovery()
221 if (IS_ERR(task)) in nlmclnt_recovery()
224 "(%ld)\n", host->h_name, PTR_ERR(task)); in nlmclnt_recovery()
/fs/
Dproc_namespace.c245 struct task_struct *task = get_proc_task(inode); in mounts_open_common() local
253 if (!task) in mounts_open_common()
256 task_lock(task); in mounts_open_common()
257 nsp = task->nsproxy; in mounts_open_common()
259 task_unlock(task); in mounts_open_common()
260 put_task_struct(task); in mounts_open_common()
265 if (!task->fs) { in mounts_open_common()
266 task_unlock(task); in mounts_open_common()
267 put_task_struct(task); in mounts_open_common()
271 get_fs_root(task->fs, &root); in mounts_open_common()
[all …]
Dnsfs.c126 struct task_struct *task; member
133 return args->ns_ops->get(args->task); in ns_get_path_task()
136 int ns_get_path(struct path *path, struct task_struct *task, in ns_get_path() argument
141 .task = task, in ns_get_path()
217 int ns_get_name(char *buf, size_t size, struct task_struct *task, in ns_get_name() argument
223 ns = ns_ops->get(task); in ns_get_name()
Dfile.c937 struct file *fget_task(struct task_struct *task, unsigned int fd) in fget_task() argument
941 task_lock(task); in fget_task()
942 if (task->files) in fget_task()
943 file = __fget_files(task->files, fd, 0); in fget_task()
944 task_unlock(task); in fget_task()
949 struct file *task_lookup_fd_rcu(struct task_struct *task, unsigned int fd) in task_lookup_fd_rcu() argument
955 task_lock(task); in task_lookup_fd_rcu()
956 files = task->files; in task_lookup_fd_rcu()
959 task_unlock(task); in task_lookup_fd_rcu()
964 struct file *task_lookup_next_fd_rcu(struct task_struct *task, unsigned int *ret_fd) in task_lookup_next_fd_rcu() argument
[all …]
Dfile_table.c372 struct task_struct *task = current; in fput() local
374 if (likely(!in_interrupt() && !(task->flags & PF_KTHREAD))) { in fput()
376 if (!task_work_add(task, &file->f_rcuhead, TWA_RESUME)) in fput()
401 struct task_struct *task = current; in __fput_sync() local
402 BUG_ON(!(task->flags & PF_KTHREAD)); in __fput_sync()
/fs/nfsd/
Dnfs4callback.c972 static void nfsd4_cb_probe_done(struct rpc_task *task, void *calldata) in nfsd4_cb_probe_done() argument
976 if (task->tk_status) in nfsd4_cb_probe_done()
977 nfsd4_mark_cb_down(clp, task->tk_status); in nfsd4_cb_probe_done()
1028 static bool nfsd41_cb_get_slot(struct nfsd4_callback *cb, struct rpc_task *task) in nfsd41_cb_get_slot() argument
1034 rpc_sleep_on(&clp->cl_cb_waitq, task, NULL); in nfsd41_cb_get_slot()
1040 rpc_wake_up_queued_task(&clp->cl_cb_waitq, task); in nfsd41_cb_get_slot()
1071 static void nfsd4_cb_prepare(struct rpc_task *task, void *calldata) in nfsd4_cb_prepare() argument
1083 if (minorversion && !nfsd41_cb_get_slot(cb, task)) in nfsd4_cb_prepare()
1085 rpc_call_start(task); in nfsd4_cb_prepare()
1088 static bool nfsd4_cb_sequence_done(struct rpc_task *task, struct nfsd4_callback *cb) in nfsd4_cb_sequence_done() argument
[all …]
/fs/nfs/blocklayout/
Dblocklayout.c211 struct rpc_task *task; in bl_read_cleanup() local
214 task = container_of(work, struct rpc_task, u.tk_work); in bl_read_cleanup()
215 hdr = container_of(task, struct nfs_pgio_header, task); in bl_read_cleanup()
224 hdr->task.tk_status = hdr->pnfs_error; in bl_end_par_io_read()
225 INIT_WORK(&hdr->task.u.tk_work, bl_read_cleanup); in bl_end_par_io_read()
226 schedule_work(&hdr->task.u.tk_work); in bl_end_par_io_read()
343 struct rpc_task *task = container_of(work, struct rpc_task, u.tk_work); in bl_write_cleanup() local
345 container_of(task, struct nfs_pgio_header, task); in bl_write_cleanup()
368 hdr->task.tk_status = hdr->pnfs_error; in bl_end_par_io_write()
370 INIT_WORK(&hdr->task.u.tk_work, bl_write_cleanup); in bl_end_par_io_write()
[all …]

123