Lines Matching full:fc
26 struct fuse_conn *fc; in fuse_ctl_file_conn_get() local
28 fc = file_inode(file)->i_private; in fuse_ctl_file_conn_get()
29 if (fc) in fuse_ctl_file_conn_get()
30 fc = fuse_conn_get(fc); in fuse_ctl_file_conn_get()
32 return fc; in fuse_ctl_file_conn_get()
38 struct fuse_conn *fc = fuse_ctl_file_conn_get(file); in fuse_conn_abort_write() local
39 if (fc) { in fuse_conn_abort_write()
40 if (fc->abort_err) in fuse_conn_abort_write()
41 fc->aborted = true; in fuse_conn_abort_write()
42 fuse_abort_conn(fc); in fuse_conn_abort_write()
43 fuse_conn_put(fc); in fuse_conn_abort_write()
56 struct fuse_conn *fc = fuse_ctl_file_conn_get(file); in fuse_conn_waiting_read() local
57 if (!fc) in fuse_conn_waiting_read()
60 value = atomic_read(&fc->num_waiting); in fuse_conn_waiting_read()
62 fuse_conn_put(fc); in fuse_conn_waiting_read()
107 struct fuse_conn *fc; in fuse_conn_max_background_read() local
110 fc = fuse_ctl_file_conn_get(file); in fuse_conn_max_background_read()
111 if (!fc) in fuse_conn_max_background_read()
114 val = READ_ONCE(fc->max_background); in fuse_conn_max_background_read()
115 fuse_conn_put(fc); in fuse_conn_max_background_read()
130 struct fuse_conn *fc = fuse_ctl_file_conn_get(file); in fuse_conn_max_background_write() local
131 if (fc) { in fuse_conn_max_background_write()
132 spin_lock(&fc->bg_lock); in fuse_conn_max_background_write()
133 fc->max_background = val; in fuse_conn_max_background_write()
134 fc->blocked = fc->num_background >= fc->max_background; in fuse_conn_max_background_write()
135 if (!fc->blocked) in fuse_conn_max_background_write()
136 wake_up(&fc->blocked_waitq); in fuse_conn_max_background_write()
137 spin_unlock(&fc->bg_lock); in fuse_conn_max_background_write()
138 fuse_conn_put(fc); in fuse_conn_max_background_write()
149 struct fuse_conn *fc; in fuse_conn_congestion_threshold_read() local
152 fc = fuse_ctl_file_conn_get(file); in fuse_conn_congestion_threshold_read()
153 if (!fc) in fuse_conn_congestion_threshold_read()
156 val = READ_ONCE(fc->congestion_threshold); in fuse_conn_congestion_threshold_read()
157 fuse_conn_put(fc); in fuse_conn_congestion_threshold_read()
167 struct fuse_conn *fc; in fuse_conn_congestion_threshold_write() local
174 fc = fuse_ctl_file_conn_get(file); in fuse_conn_congestion_threshold_write()
175 if (!fc) in fuse_conn_congestion_threshold_write()
178 WRITE_ONCE(fc->congestion_threshold, val); in fuse_conn_congestion_threshold_write()
179 fuse_conn_put(fc); in fuse_conn_congestion_threshold_write()
207 struct fuse_conn *fc, in fuse_ctl_add_dentry() argument
228 inode->i_uid = fc->user_id; in fuse_ctl_add_dentry()
229 inode->i_gid = fc->group_id; in fuse_ctl_add_dentry()
236 inode->i_private = fc; in fuse_ctl_add_dentry()
246 int fuse_ctl_add_conn(struct fuse_conn *fc) in fuse_ctl_add_conn() argument
251 if (!fuse_control_sb || fc->no_control) in fuse_ctl_add_conn()
256 sprintf(name, "%u", fc->dev); in fuse_ctl_add_conn()
257 parent = fuse_ctl_add_dentry(parent, fc, name, S_IFDIR | 0500, 2, in fuse_ctl_add_conn()
263 if (!fuse_ctl_add_dentry(parent, fc, "waiting", S_IFREG | 0400, 1, in fuse_ctl_add_conn()
265 !fuse_ctl_add_dentry(parent, fc, "abort", S_IFREG | 0200, 1, in fuse_ctl_add_conn()
267 !fuse_ctl_add_dentry(parent, fc, "max_background", S_IFREG | 0600, in fuse_ctl_add_conn()
269 !fuse_ctl_add_dentry(parent, fc, "congestion_threshold", in fuse_ctl_add_conn()
277 fuse_ctl_remove_conn(fc); in fuse_ctl_add_conn()
290 void fuse_ctl_remove_conn(struct fuse_conn *fc) in fuse_ctl_remove_conn() argument
295 if (!fuse_control_sb || fc->no_control) in fuse_ctl_remove_conn()
298 sprintf(name, "%u", fc->dev); in fuse_ctl_remove_conn()
309 struct fuse_conn *fc; in fuse_ctl_fill_super() local
319 list_for_each_entry(fc, &fuse_conn_list, entry) { in fuse_ctl_fill_super()
320 err = fuse_ctl_add_conn(fc); in fuse_ctl_fill_super()