Projectname
large_stringclasses
15 values
Filepath
large_stringlengths
4
106
⌀
Function
large_stringlengths
11
3.45k
Label
list
Linux Kernel
net/sunrpc/cache.c
static int content_release_procfs(struct inode *inode, struct file *filp) { struct cache_detail *cd = pde_data(inode); return content_release(inode, filp, cd); }
[ 0, 0 ]
Linux Kernel
net/sunrpc/cache.c
static int create_cache_proc_entries(struct cache_detail *cd, struct net *net) { return 0; } #endif
[ 0, 0 ]
Linux Kernel
net/sunrpc/cache.c
static int cache_open_pipefs(struct inode *inode, struct file *filp) { struct cache_detail *cd = RPC_I(inode)->private; return cache_open(inode, filp, cd); }
[ 0, 0 ]
Linux Kernel
net/sunrpc/cache.c
static int cache_release_pipefs(struct inode *inode, struct file *filp) { struct cache_detail *cd = RPC_I(inode)->private; return cache_release(inode, filp, cd); }
[ 0, 0 ]
Linux Kernel
net/sunrpc/cache.c
static int content_open_pipefs(struct inode *inode, struct file *filp) { struct cache_detail *cd = RPC_I(inode)->private; return content_open(inode, filp, cd); }
[ 0, 0 ]
Linux Kernel
net/sunrpc/cache.c
static int release_flush_pipefs(struct inode *inode, struct file *filp) { struct cache_detail *cd = RPC_I(inode)->private; return release_flush(inode, filp, cd); }
[ 0, 0 ]
Linux Kernel
net/sunrpc/clnt.c
static void rpc_unregister_client(struct rpc_clnt *clnt) { struct net *net = rpc_net_ns(clnt); struct sunrpc_net *sn = net_generic(net, sunrpc_net_id); spin_lock(&sn->rpc_client_lock); list_del(&clnt->cl_clients); spin_unlock(&sn->rpc_client_lock); }
[ 0, 0 ]
Linux Kernel
net/sunrpc/clnt.c
static int rpc_setup_pipedir(struct super_block *pipefs_sb, struct rpc_clnt *clnt) { struct dentry *dentry; if (clnt->cl_program->pipe_dir_name != NULL) { dentry = rpc_setup_pipedir_sb(pipefs_sb, clnt); if (IS_ERR(dentry)) return PTR_ERR(dentry); } return 0; }
[ 1, 0 ]
Linux Kernel
net/sunrpc/clnt.c
static int __rpc_clnt_handle_event(struct rpc_clnt *clnt, unsigned long event, struct super_block *sb) { struct dentry *dentry; switch (event) { case RPC_PIPEFS_MOUNT: dentry = rpc_setup_pipedir_sb(sb, clnt); if (!dentry) return -ENOENT; if (IS_ERR(dentry)) ...
[ 0, 0 ]
Linux Kernel
net/sunrpc/clnt.c
static struct rpc_clnt *rpc_get_client_for_event(struct net *net, int event) { struct sunrpc_net *sn = net_generic(net, sunrpc_net_id); struct rpc_clnt *clnt; spin_lock(&sn->rpc_client_lock); list_for_each_entry(clnt, &sn->all_clients, cl_clients) { if (rpc_clnt_skip_event(clnt, event)) continue; ...
[ 0, 0 ]
Linux Kernel
net/sunrpc/clnt.c
void rpc_cleanup_clids(void) { ida_destroy(&rpc_clids); }
[ 0, 0 ]
Linux Kernel
net/sunrpc/clnt.c
static int _rpc_clnt_xprt_iter_init(struct rpc_clnt *clnt, struct rpc_xprt_iter *xpi, void func(struct rpc_xprt_iter *xpi, struct rpc_xprt_switch *xps)) { struct rpc_xprt_switch *xps; rcu_read_loc...
[ 0, 0 ]
Linux Kernel
net/sunrpc/clnt.c
static int rpc_clnt_disconnect_xprt(struct rpc_clnt *clnt, struct rpc_xprt *xprt, void *dummy) { if (xprt_connected(xprt)) xprt_force_disconnect(xprt); return 0; }
[ 0, 0 ]
Linux Kernel
net/sunrpc/clnt.c
static struct rpc_xprt *rpc_task_get_first_xprt(struct rpc_clnt *clnt) { struct rpc_xprt *xprt; rcu_read_lock(); xprt = xprt_get(rcu_dereference(clnt->cl_xprt)); rcu_read_unlock(); return rpc_task_get_xprt(clnt, xprt); }
[ 0, 0 ]
Linux Kernel
net/sunrpc/clnt.c
static void rpc_task_set_client(struct rpc_task *task, struct rpc_clnt *clnt) { rpc_task_set_transport(task, clnt); task->tk_client = clnt; refcount_inc(&clnt->cl_count); if (clnt->cl_softrtry) task->tk_flags |= RPC_TASK_SOFT; if (clnt->cl_softerr) task->tk_flags |= RPC_TASK_TIMEOUT; if (clnt->cl_no...
[ 0, 0 ]
Linux Kernel
net/sunrpc/clnt.c
static void rpc_default_callback(struct rpc_task *task, void *data) {}
[ 0, 0 ]
Linux Kernel
net/sunrpc/clnt.c
struct rpc_task *rpc_run_bc_task(struct rpc_rqst *req) { struct rpc_task *task; struct rpc_task_setup task_setup_data = { .callback_ops = &rpc_default_ops, .flags = RPC_TASK_SOFTCONN | RPC_TASK_NO_RETRANS_TIMEOUT, }; dprintk("RPC: rpc_run_bc_task req= %p\n", req); task = rpc_new_task(&task_setup...
[ 0, 0 ]
Linux Kernel
net/sunrpc/clnt.c
void rpc_prepare_reply_pages(struct rpc_rqst *req, struct page **pages, unsigned int base, unsigned int len, unsigned int hdrsize) { hdrsize += RPC_REPHDRSIZE + req->rq_cred->cr_auth->au_ralign; xdr_inline_pages(&req->rq_rcv_buf, hdrsize << 2, pages, base, ...
[ 1, 0 ]
Linux Kernel
net/sunrpc/clnt.c
size_t rpc_peeraddr(struct rpc_clnt *clnt, struct sockaddr *buf, size_t bufsize) { size_t bytes; struct rpc_xprt *xprt; rcu_read_lock(); xprt = rcu_dereference(clnt->cl_xprt); bytes = xprt->addrlen; if (bytes > bufsize) bytes = bufsize; memcpy(buf, &xprt->addr, bytes); rcu_read...
[ 1, 0 ]
Linux Kernel
net/sunrpc/clnt.c
unsigned int rpc_num_bc_slots(struct rpc_clnt *clnt) { struct rpc_xprt *xprt; unsigned int ret; rcu_read_lock(); xprt = rcu_dereference(clnt->cl_xprt); ret = xprt->ops->bc_num_slots(xprt); rcu_read_unlock(); return ret; }
[ 0, 0 ]
Linux Kernel
net/sunrpc/clnt.c
void rpc_force_rebind(struct rpc_clnt *clnt) { if (clnt->cl_autobind) { rcu_read_lock(); xprt_clear_bound(rcu_dereference(clnt->cl_xprt)); rcu_read_unlock(); } }
[ 0, 0 ]
Linux Kernel
net/sunrpc/clnt.c
int rpc_restart_call_prepare(struct rpc_task *task) { if (task->tk_ops->rpc_call_prepare != NULL) return __rpc_restart_call(task, rpc_prepare_task); return rpc_restart_call(task); }
[ 1, 0 ]
Linux Kernel
net/sunrpc/clnt.c
static void __rpc_call_rpcerror(struct rpc_task *task, int tk_status, int rpc_status) { trace_rpc_call_rpcerror(task, tk_status, rpc_status); rpc_task_set_rpc_status(task, rpc_status); rpc_exit(task, tk_status); }
[ 0, 0 ]
Linux Kernel
net/sunrpc/clnt.c
static void rpc_xdr_encode(struct rpc_task *task) { struct rpc_rqst *req = task->tk_rqstp; struct xdr_stream xdr; xdr_buf_init(&req->rq_snd_buf, req->rq_buffer, req->rq_callsize); xdr_buf_init(&req->rq_rcv_buf, req->rq_rbuffer, req->rq_rcvsize); req->rq_reply_bytes_recvd = 0; req->rq_snd_buf.head[0].iov_...
[ 0, 0 ]
Linux Kernel
net/sunrpc/clnt.c
static void call_status(struct rpc_task *task) { struct rpc_clnt *clnt = task->tk_client; int status; if (!task->tk_msg.rpc_proc->p_proc) trace_xprt_ping(task->tk_xprt, task->tk_status); status = task->tk_status; if (status >= 0) { task->tk_action = call_decode; return; } trace_rpc_call_sta...
[ 1, 0 ]
Linux Kernel
net/sunrpc/clnt.c
static void rpc_check_timeout(struct rpc_task *task) { struct rpc_clnt *clnt = task->tk_client; if (RPC_SIGNALLED(task)) return; if (xprt_adjust_timeout(task->tk_rqstp) == 0) return; trace_rpc_timeout_status(task); task->tk_timeouts++; if (RPC_IS_SOFTCONN(task) && !rpc_check_connected(task->tk_r...
[ 0, 0 ]
Linux Kernel
net/sunrpc/clnt.c
static int rpcproc_decode_null(struct rpc_rqst *rqstp, struct xdr_stream *xdr, void *obj) { return 0; }
[ 0, 0 ]
Linux Kernel
net/sunrpc/clnt.c
static struct rpc_task *rpc_call_null_helper(struct rpc_clnt *clnt, struct rpc_xprt *xprt, struct rpc_cred *cred, int flags, const struct rpc_call_ops *ops, ...
[ 0, 0 ]
Linux Kernel
net/sunrpc/clnt.c
static void rpc_cb_add_xprt_done(struct rpc_task *task, void *calldata) { struct rpc_cb_add_xprt_calldata *data = calldata; if (task->tk_status == 0) rpc_xprt_switch_add_xprt(data->xps, data->xprt); }
[ 0, 0 ]
Linux Kernel
net/sunrpc/clnt.c
static int rpc_clnt_add_xprt_helper(struct rpc_clnt *clnt, struct rpc_xprt *xprt, struct rpc_add_xprt_test *data) { struct rpc_task *task; int status = -EADDRINUSE; task = rpc_call_null_helper(clnt, xprt, NULL, 0, NULL, NULL); if (IS_ERR(t...
[ 0, 0 ]
Linux Kernel
net/sunrpc/clnt.c
static int rpc_xprt_probe_trunked(struct rpc_clnt *clnt, struct rpc_xprt *xprt, struct rpc_add_xprt_test *data) { struct rpc_xprt_switch *xps; struct rpc_xprt *main_xprt; int status = 0; xprt_get(xprt); rcu_read_lock(); main_xprt = xprt_get(rcu_dereference(clnt->cl_xprt)...
[ 0, 0 ]
Linux Kernel
net/sunrpc/clnt.c
static int rpc_xprt_offline(struct rpc_clnt *clnt, struct rpc_xprt *xprt, void *data) { struct rpc_xprt *main_xprt; struct rpc_xprt_switch *xps; int err = 0; xprt_get(xprt); rcu_read_lock(); main_xprt = xprt_get(rcu_dereference(clnt->cl_xprt)); xps = xprt_switch_get(rcu_dere...
[ 0, 0 ]
Linux Kernel
net/sunrpc/clnt.c
void rpc_clnt_manage_trunked_xprts(struct rpc_clnt *clnt) { rpc_clnt_iterate_for_each_xprt(clnt, rpc_xprt_offline, NULL); }
[ 0, 0 ]
Linux Kernel
net/sunrpc/clnt.c
void rpc_clnt_xprt_switch_put(struct rpc_clnt *clnt) { rcu_read_lock(); xprt_switch_put(rcu_dereference(clnt->cl_xpi.xpi_xpswitch)); rcu_read_unlock(); }
[ 0, 0 ]
Linux Kernel
net/sunrpc/clnt.c
static int rpc_clnt_swap_deactivate_callback(struct rpc_clnt *clnt, struct rpc_xprt *xprt, void *dummy) { xprt_disable_swap(xprt); return 0; }
[ 0, 0 ]
Linux Kernel
net/sunrpc/debugfs.c
static int tasks_show(struct seq_file *f, void *v) { u32 xid = 0; struct rpc_task *task = v; struct rpc_clnt *clnt = task->tk_client; const char *rpc_waitq = "none"; if (RPC_IS_QUEUED(task)) rpc_waitq = rpc_qname(task->tk_waitqueue); if (task->tk_rqstp) xid = be32_to_cpu(task->tk_rqstp->rq_xid); ...
[ 0, 0 ]
Linux Kernel
net/sunrpc/debugfs.c
static void *tasks_start(struct seq_file *f, loff_t *ppos) __acquires(&clnt->cl_lock)
[ 0, 0 ]
Linux Kernel
net/sunrpc/debugfs.c
static int do_xprt_debugfs(struct rpc_clnt *clnt, struct rpc_xprt *xprt, void *numv) { int len; char name[24]; char link[9]; /* enough for 8 hex digits + NULL */ int *nump = numv; if (IS_ERR_OR_NULL(xprt->debugfs)) return 0; len = snprintf(name, sizeof(name), "../../rpc_xprt/...
[ 1, 0 ]
Linux Kernel
net/sunrpc/debugfs.c
void rpc_xprt_debugfs_unregister(struct rpc_xprt *xprt) { debugfs_remove_recursive(xprt->debugfs); xprt->debugfs = NULL; }
[ 0, 0 ]
Linux Kernel
net/sunrpc/rpcb_clnt.c
static int rpcb_get_local(struct net *net) { int cnt; struct sunrpc_net *sn = net_generic(net, sunrpc_net_id); spin_lock(&sn->rpcb_clnt_lock); if (sn->rpcb_users) sn->rpcb_users++; cnt = sn->rpcb_users; spin_unlock(&sn->rpcb_clnt_lock); return cnt; }
[ 0, 0 ]
Linux Kernel
net/sunrpc/rpcb_clnt.c
int rpcb_register(struct net *net, u32 prog, u32 vers, int prot, unsigned short port) { struct rpcbind_args map = { .r_prog = prog, .r_vers = vers, .r_prot = prot, .r_port = port, }; struct rpc_message msg = { .rpc_argp = &map, }; struct sunrpc_net *sn = net_gen...
[ 0, 0 ]
Linux Kernel
net/sunrpc/rpcb_clnt.c
static int rpcb_unregister_all_protofamilies(struct sunrpc_net *sn, struct rpc_message *msg) { struct rpcbind_args *map = msg->rpc_argp; trace_rpcb_unregister(map->r_prog, map->r_vers, map->r_netid); map->r_addr = ""; msg->rpc_proc = &rpcb_procedures4[RPCBPROC_UNS...
[ 0, 0 ]
Linux Kernel
net/sunrpc/rpcb_clnt.c
static int rpcb_dec_set(struct rpc_rqst *req, struct xdr_stream *xdr, void *data) { unsigned int *boolp = data; __be32 *p; p = xdr_inline_decode(xdr, 4); if (unlikely(p == NULL)) return -EIO; *boolp = 0; if (*p != xdr_zero) *boolp = 1; return 0; }
[ 1, 0 ]
Linux Kernel
net/sunrpc/rpcb_clnt.c
static int rpcb_dec_getaddr(struct rpc_rqst *req, struct xdr_stream *xdr, void *data) { struct rpcbind_args *rpcb = data; struct sockaddr_storage address; struct sockaddr *sap = (struct sockaddr *)&address; __be32 *p; u32 len; rpcb->r_port = 0; p = xdr_inline_decode(xdr, 4); ...
[ 1, 0 ]
Linux Kernel
net/sunrpc/rpc_pipe.c
static void rpc_purge_list(wait_queue_head_t *waitq, struct list_head *head, void (*destroy_msg)(struct rpc_pipe_msg *), int err) { struct rpc_pipe_msg *msg; if (list_empty(head)) return; do { msg = list_entry(head->next, struct rpc_pipe_msg, list); ...
[ 0, 0 ]
Linux Kernel
net/sunrpc/rpc_pipe.c
static ssize_t rpc_pipe_read(struct file *filp, char __user *buf, size_t len, loff_t *offset) { struct inode *inode = file_inode(filp); struct rpc_pipe *pipe; struct rpc_pipe_msg *msg; int res = 0; inode_lock(inode); pipe = RPC_I(inode)->pipe; if (pipe == NULL) { res = -E...
[ 1, 0 ]
Linux Kernel
net/sunrpc/rpc_pipe.c
static ssize_t rpc_pipe_write(struct file *filp, const char __user *buf, size_t len, loff_t *offset) { struct inode *inode = file_inode(filp); int res; inode_lock(inode); res = -EPIPE; if (RPC_I(inode)->pipe != NULL) res = RPC_I(inode)->pipe->ops->downcall(filp, buf, len); ...
[ 0, 0 ]
Linux Kernel
net/sunrpc/rpc_pipe.c
static long rpc_pipe_ioctl(struct file *filp, unsigned int cmd, unsigned long arg) { struct inode *inode = file_inode(filp); struct rpc_pipe *pipe; int len; switch (cmd) { case FIONREAD: inode_lock(inode); pipe = RPC_I(inode)->pipe; if (pipe == NULL) { inode_unlo...
[ 0, 0 ]
Linux Kernel
net/sunrpc/rpc_pipe.c
static int rpc_show_info(struct seq_file *m, void *v) { struct rpc_clnt *clnt = m->private; rcu_read_lock(); seq_printf(m, "RPC server: %s\n", rcu_dereference(clnt->cl_xprt)->servername); seq_printf(m, "service: %s (%d) version %d\n", clnt->cl_program->name, clnt->cl_prog, clnt->cl_vers); seq_p...
[ 1, 0 ]
Linux Kernel
net/sunrpc/rpc_pipe.c
static int rpc_info_open(struct inode *inode, struct file *file) { struct rpc_clnt *clnt = NULL; int ret = single_open(file, rpc_show_info, NULL); if (!ret) { struct seq_file *m = file->private_data; spin_lock(&file->f_path.dentry->d_lock); if (!d_unhashed(file->f_path.dentry)) clnt = RPC_I(i...
[ 0, 0 ]
Linux Kernel
net/sunrpc/rpc_pipe.c
void rpc_destroy_pipe_data(struct rpc_pipe *pipe) { kfree(pipe); }
[ 0, 0 ]
Linux Kernel
net/sunrpc/rpc_pipe.c
static int __rpc_rmdir(struct inode *dir, struct dentry *dentry) { int ret; dget(dentry); ret = simple_rmdir(dir, dentry); d_drop(dentry); if (!ret) fsnotify_rmdir(dir, dentry); dput(dentry); return ret; }
[ 0, 0 ]
Linux Kernel
net/sunrpc/rpc_pipe.c
static int __rpc_unlink(struct inode *dir, struct dentry *dentry) { int ret; dget(dentry); ret = simple_unlink(dir, dentry); d_drop(dentry); if (!ret) fsnotify_unlink(dir, dentry); dput(dentry); return ret; }
[ 0, 0 ]
Linux Kernel
net/sunrpc/rpc_pipe.c
static void __rpc_depopulate(struct dentry *parent, const struct rpc_filelist *files, int start, int eof) { struct inode *dir = d_inode(parent); struct dentry *dentry; struct qstr name; int i; for (i = start; i < eof; i++) { name.name = files[i].n...
[ 0, 1 ]
Linux Kernel
net/sunrpc/rpc_pipe.c
struct dentry *rpc_mkpipe_dentry(struct dentry *parent, const char *name, void *private, struct rpc_pipe *pipe) { struct dentry *dentry; struct inode *dir = d_inode(parent); umode_t umode = S_IFIFO | 0600; int err; if (pipe->ops->upcall == NULL) umode &= ~0444; if (pipe...
[ 1, 0 ]
Linux Kernel
net/sunrpc/rpc_pipe.c
void rpc_init_pipe_dir_head(struct rpc_pipe_dir_head *pdh) { INIT_LIST_HEAD(&pdh->pdh_entries); pdh->pdh_dentry = NULL; }
[ 0, 0 ]
Linux Kernel
net/sunrpc/rpc_pipe.c
int rpc_remove_client_dir(struct rpc_clnt *rpc_client) { struct dentry *dentry = rpc_client->cl_pipedir_objects.pdh_dentry; if (dentry == NULL) return 0; rpc_destroy_pipe_dir_objects(&rpc_client->cl_pipedir_objects); rpc_client->cl_pipedir_objects.pdh_dentry = NULL; return rpc_rmdir_depopulate(dentry, rp...
[ 0, 0 ]
Linux Kernel
net/sunrpc/rpc_pipe.c
struct dentry *rpc_d_lookup_sb(const struct super_block *sb, const unsigned char *dir_name) { struct qstr dir = QSTR_INIT(dir_name, strlen(dir_name)); return d_hash_and_lookup(sb->s_root, &dir); }
[ 0, 0 ]
Linux Kernel
net/sunrpc/rpc_pipe.c
int rpc_pipefs_init_net(struct net *net) { struct sunrpc_net *sn = net_generic(net, sunrpc_net_id); sn->gssd_dummy = rpc_mkpipe_data(&gssd_dummy_pipe_ops, 0); if (IS_ERR(sn->gssd_dummy)) return PTR_ERR(sn->gssd_dummy); mutex_init(&sn->pipefs_sb_lock); sn->pipe_version = -1; return 0; }
[ 0, 0 ]
Linux Kernel
net/sunrpc/rpc_pipe.c
void rpc_pipefs_exit_net(struct net *net) { struct sunrpc_net *sn = net_generic(net, sunrpc_net_id); rpc_destroy_pipe_data(sn->gssd_dummy); }
[ 0, 0 ]
Linux Kernel
net/sunrpc/rpc_pipe.c
static struct dentry *rpc_gssd_dummy_populate(struct dentry *root, struct rpc_pipe *pipe_data) { int ret = 0; struct dentry *gssd_dentry; struct dentry *clnt_dentry = NULL; struct dentry *pipe_dentry = NULL; struct qstr q = QSTR_INIT(files[RPCAUTH_gssd].name...
[ 0, 0 ]
Linux Kernel
net/sunrpc/rpc_pipe.c
bool gssd_running(struct net *net) { struct sunrpc_net *sn = net_generic(net, sunrpc_net_id); struct rpc_pipe *pipe = sn->gssd_dummy; return pipe->nreaders || pipe->nwriters; }
[ 1, 0 ]
Linux Kernel
net/sunrpc/rpc_pipe.c
static int rpc_init_fs_context(struct fs_context *fc) { put_user_ns(fc->user_ns); fc->user_ns = get_user_ns(fc->net_ns->user_ns); fc->ops = &rpc_fs_context_ops; return 0; }
[ 0, 0 ]
Linux Kernel
net/sunrpc/rpc_pipe.c
int register_rpc_pipefs(void) { int err; rpc_inode_cachep = kmem_cache_create("rpc_inode_cache", sizeof(struct rpc_inode), 0, (SLAB_HWCACHE_ALIGN | SLAB_RECLAIM_ACCOUNT | SLAB_MEM_SPREAD | SLAB_ACCOUNT), init_once); if (!rpc_inode_ca...
[ 1, 0 ]
Linux Kernel
net/sunrpc/sched.c
bool rpc_task_set_rpc_status(struct rpc_task *task, int rpc_status) { if (cmpxchg(&task->tk_rpc_status, 0, rpc_status) == 0) return true; return false; }
[ 0, 0 ]
Linux Kernel
net/sunrpc/sched.c
static void rpc_set_waitqueue_priority(struct rpc_wait_queue *queue, int priority) { if (queue->priority != priority) { queue->priority = priority; queue->nr = 1U << priority; } }
[ 0, 0 ]
Linux Kernel
net/sunrpc/sched.c
static void rpc_reset_waitqueue_priority(struct rpc_wait_queue *queue) { rpc_set_waitqueue_priority(queue, queue->maxpriority); }
[ 0, 0 ]
Linux Kernel
net/sunrpc/sched.c
void rpc_init_priority_wait_queue(struct rpc_wait_queue *queue, const char *qname) { __rpc_init_priority_wait_queue(queue, qname, RPC_NR_PRIORITY); }
[ 0, 0 ]
Linux Kernel
net/sunrpc/sched.c
void rpc_destroy_wait_queue(struct rpc_wait_queue *queue) { cancel_delayed_work_sync(&queue->timer_list.dwork); }
[ 0, 0 ]
Linux Kernel
net/sunrpc/sched.c
static void __rpc_sleep_on_priority_timeout(struct rpc_wait_queue *q, struct rpc_task *task, unsigned long timeout, unsigned char queue_priority) { if (WARN_ON_ONCE(RPC_IS_QUEUED(task))...
[ 0, 0 ]
Linux Kernel
net/sunrpc/sched.c
void rpc_sleep_on_timeout(struct rpc_wait_queue *q, struct rpc_task *task, rpc_action action, unsigned long timeout) { if (!rpc_sleep_check_activated(task)) return; rpc_set_tk_callback(task, action); spin_lock(&q->lock); __rpc_sleep_on_priority_timeout(q, task, timeout, task->tk_...
[ 0, 0 ]
Linux Kernel
net/sunrpc/sched.c
void rpc_delay(struct rpc_task *task, unsigned long delay) { rpc_sleep_on_timeout(&delay_queue, task, __rpc_atrun, jiffies + delay); }
[ 0, 0 ]
Linux Kernel
net/sunrpc/sched.c
void rpc_task_try_cancel(struct rpc_task *task, int error) { struct rpc_wait_queue *queue; if (!rpc_task_set_rpc_status(task, error)) return; queue = READ_ONCE(task->tk_waitqueue); if (queue) rpc_wake_up_queued_task(queue, task); }
[ 0, 0 ]
Linux Kernel
net/sunrpc/sched.c
static bool xprt_needs_memalloc(struct rpc_xprt *xprt, struct rpc_task *tk) { if (!xprt) return false; if (!atomic_read(&xprt->swapper)) return false; return test_bit(XPRT_LOCKED, &xprt->state) && xprt->snd_task == tk; }
[ 0, 0 ]
Linux Kernel
net/sunrpc/sched.c
void rpc_execute(struct rpc_task *task) { bool is_async = RPC_IS_ASYNC(task); rpc_set_active(task); rpc_make_runnable(rpciod_workqueue, task); if (!is_async) { unsigned int pflags = memalloc_nofs_save(); __rpc_execute(task); memalloc_nofs_restore(pflags); } }
[ 1, 0 ]
Linux Kernel
net/sunrpc/sched.c
static void rpc_async_schedule(struct work_struct *work) { unsigned int pflags = memalloc_nofs_save(); __rpc_execute(container_of(work, struct rpc_task, u.tk_work)); memalloc_nofs_restore(pflags); }
[ 1, 0 ]
Linux Kernel
net/sunrpc/sched.c
static struct rpc_task *rpc_alloc_task(void) { struct rpc_task *task; task = kmem_cache_alloc(rpc_task_slabp, rpc_task_gfp_mask()); if (task) return task; return mempool_alloc(rpc_task_mempool, GFP_NOWAIT); }
[ 0, 0 ]
Linux Kernel
net/sunrpc/sched.c
static void rpc_async_release(struct work_struct *work) { unsigned int pflags = memalloc_nofs_save(); rpc_free_task(container_of(work, struct rpc_task, u.tk_work)); memalloc_nofs_restore(pflags); }
[ 1, 0 ]
Linux Kernel
net/sunrpc/sched.c
static void rpc_release_resources_task(struct rpc_task *task) { xprt_release(task); if (task->tk_msg.rpc_cred) { if (!(task->tk_flags & RPC_TASK_CRED_NOREF)) put_cred(task->tk_msg.rpc_cred); task->tk_msg.rpc_cred = NULL; } rpc_task_release_client(task); }
[ 0, 0 ]
Linux Kernel
net/sunrpc/sched.c
static void rpc_final_put_task(struct rpc_task *task, struct workqueue_struct *q) { if (q != NULL) { INIT_WORK(&task->u.tk_work, rpc_async_release); queue_work(q, &task->u.tk_work); } else rpc_free_task(task); }
[ 0, 0 ]
Linux Kernel
net/sunrpc/sched.c
void rpc_put_task(struct rpc_task *task) { rpc_do_put_task(task, NULL); }
[ 0, 0 ]
Linux Kernel
net/sunrpc/sched.c
int rpciod_up(void) { return try_module_get(THIS_MODULE) ? 0 : -EINVAL; }
[ 0, 0 ]
Linux Kernel
net/sunrpc/socklib.c
static inline int xprt_sendmsg(struct socket *sock, struct msghdr *msg, size_t seek) { if (seek) iov_iter_advance(&msg->msg_iter, seek); return sock_sendmsg(sock, msg); }
[ 0, 0 ]
Linux Kernel
net/sunrpc/stats.c
void svc_seq_show(struct seq_file *seq, const struct svc_stat *statp) { const struct svc_program *prog = statp->program; const struct svc_version *vers; unsigned int i, j; seq_printf(seq, "net %u %u %u %u\n", statp->netcnt, statp->netudpcnt, statp->nettcpcnt, statp->nettcpconn); seq_printf(seq, ...
[ 0, 0 ]
Linux Kernel
net/sunrpc/stats.c
static int do_print_stats(struct rpc_clnt *clnt, struct rpc_xprt *xprt, void *seqv) { struct seq_file *seq = seqv; xprt->ops->print_stats(xprt, seq); return 0; }
[ 0, 0 ]
Linux Kernel
net/sunrpc/stats.c
void rpc_proc_unregister(struct net *net, const char *name) { struct sunrpc_net *sn; sn = net_generic(net, sunrpc_net_id); remove_proc_entry(name, sn->proc_net_rpc); }
[ 0, 0 ]
Linux Kernel
net/sunrpc/stats.c
void rpc_proc_exit(struct net *net) { dprintk("RPC: unregistering /proc/net/rpc\n"); remove_proc_entry("rpc", net->proc_net); }
[ 0, 0 ]
Linux Kernel
net/sunrpc/sunrpc.h
static inline int sock_is_loopback(struct sock *sk) { struct dst_entry *dst; int loopback = 0; rcu_read_lock(); dst = rcu_dereference(sk->sk_dst_cache); if (dst && dst->dev && (dst->dev->features & NETIF_F_LOOPBACK)) loopback = 1; rcu_read_unlock(); return loopback; }
[ 1, 0 ]
Linux Kernel
net/sunrpc/svc.c
static int svc_pool_map_alloc_arrays(struct svc_pool_map *m, unsigned int maxpools) { m->to_pool = kcalloc(maxpools, sizeof(unsigned int), GFP_KERNEL); if (!m->to_pool) goto fail; m->pool_to = kcalloc(maxpools, sizeof(unsigned int), GFP_KERNEL); if (!m->pool_to) goto...
[ 1, 0 ]
Linux Kernel
net/sunrpc/svc.c
static unsigned int svc_pool_map_get(void) { struct svc_pool_map *m = &svc_pool_map; int npools = -1; mutex_lock(&svc_pool_map_mutex); if (m->count++) { mutex_unlock(&svc_pool_map_mutex); WARN_ON_ONCE(m->npools <= 1); return m->npools; } if (m->mode == SVC_POOL_AUTO) m->mode = svc_pool_ma...
[ 1, 0 ]
Linux Kernel
net/sunrpc/svc.c
static inline void svc_pool_map_set_cpumask(struct task_struct *task, unsigned int pidx) { struct svc_pool_map *m = &svc_pool_map; unsigned int node = m->pool_to[pidx]; WARN_ON_ONCE(m->count == 0); if (m->count == 0) return; switch (m->mode) { case SVC_POOL_...
[ 1, 0 ]
Linux Kernel
net/sunrpc/svc.c
void svc_rpcb_cleanup(struct svc_serv *serv, struct net *net) { svc_unregister(serv, net); rpcb_put_local(net); }
[ 0, 0 ]
Linux Kernel
net/sunrpc/svc.c
static int svc_uses_rpcbind(struct svc_serv *serv) { struct svc_program *progp; unsigned int i; for (progp = serv->sv_program; progp; progp = progp->pg_next) { for (i = 0; i < progp->pg_nvers; i++) { if (progp->pg_vers[i] == NULL) continue; if (!progp->pg_vers[i]->vs_hidden) retu...
[ 1, 0 ]
Linux Kernel
net/sunrpc/svc.c
struct svc_serv *svc_create(struct svc_program *prog, unsigned int bufsize, int (*threadfn)(void *data)) { return __svc_create(prog, bufsize, 1, threadfn); }
[ 0, 0 ]
Linux Kernel
net/sunrpc/svc.c
struct svc_rqst *svc_rqst_alloc(struct svc_serv *serv, struct svc_pool *pool, int node) { struct svc_rqst *rqstp; rqstp = kzalloc_node(sizeof(*rqstp), GFP_KERNEL, node); if (!rqstp) return rqstp; __set_bit(RQ_BUSY, &rqstp->rq_flags); rqstp->rq_server = serv; rqstp->rq_...
[ 0, 0 ]
Linux Kernel
net/sunrpc/svc.c
static inline struct svc_pool * choose_pool(struct svc_serv *serv, struct svc_pool *pool, unsigned int *state) { if (pool != NULL) return pool; return &serv->sv_pools[(*state)++ % serv->sv_nrpools]; }
[ 0, 0 ]
Linux Kernel
net/sunrpc/svc.c
static int svc_start_kthreads(struct svc_serv *serv, struct svc_pool *pool, int nrservs) { struct svc_rqst *rqstp; struct task_struct *task; struct svc_pool *chosen_pool; unsigned int state = serv->sv_nrthreads - 1; int node; do { nrservs--; chosen_pool = choose_pool(s...
[ 1, 0 ]
Linux Kernel
net/sunrpc/svc.c
int svc_set_num_threads(struct svc_serv *serv, struct svc_pool *pool, int nrservs) { if (pool == NULL) { nrservs -= serv->sv_nrthreads; } else { spin_lock_bh(&pool->sp_lock); nrservs -= pool->sp_nrthreads; spin_unlock_bh(&pool->sp_lock); } if (nrservs > 0) return sv...
[ 0, 0 ]
Linux Kernel
net/sunrpc/svc.c
static int __svc_rpcb_register4(struct net *net, const u32 program, const u32 version, const unsigned short protocol, const unsigned short port) { const struct sockaddr_in sin = { .sin_family = AF_INET, .sin_ad...
[ 0, 0 ]
Linux Kernel
net/sunrpc/svc.c
int svc_generic_rpcbind_set(struct net *net, const struct svc_program *progp, u32 version, int family, unsigned short proto, unsigned short port) { const struct svc_version *vers = progp->pg_vers[version]; int error; if (vers == NULL) return 0; if (v...
[ 0, 0 ]