Lines Matching refs:fc
25 struct fuse_conn *fc; in fuse_ctl_file_conn_get() local
27 fc = file_inode(file)->i_private; in fuse_ctl_file_conn_get()
28 if (fc) in fuse_ctl_file_conn_get()
29 fc = fuse_conn_get(fc); in fuse_ctl_file_conn_get()
31 return fc; in fuse_ctl_file_conn_get()
37 struct fuse_conn *fc = fuse_ctl_file_conn_get(file); in fuse_conn_abort_write() local
38 if (fc) { in fuse_conn_abort_write()
39 if (fc->abort_err) in fuse_conn_abort_write()
40 fc->aborted = true; in fuse_conn_abort_write()
41 fuse_abort_conn(fc); in fuse_conn_abort_write()
42 fuse_conn_put(fc); in fuse_conn_abort_write()
55 struct fuse_conn *fc = fuse_ctl_file_conn_get(file); in fuse_conn_waiting_read() local
56 if (!fc) in fuse_conn_waiting_read()
59 value = atomic_read(&fc->num_waiting); in fuse_conn_waiting_read()
61 fuse_conn_put(fc); in fuse_conn_waiting_read()
106 struct fuse_conn *fc; in fuse_conn_max_background_read() local
109 fc = fuse_ctl_file_conn_get(file); in fuse_conn_max_background_read()
110 if (!fc) in fuse_conn_max_background_read()
113 val = READ_ONCE(fc->max_background); in fuse_conn_max_background_read()
114 fuse_conn_put(fc); in fuse_conn_max_background_read()
129 struct fuse_conn *fc = fuse_ctl_file_conn_get(file); in fuse_conn_max_background_write() local
130 if (fc) { in fuse_conn_max_background_write()
131 spin_lock(&fc->bg_lock); in fuse_conn_max_background_write()
132 fc->max_background = val; in fuse_conn_max_background_write()
133 fc->blocked = fc->num_background >= fc->max_background; in fuse_conn_max_background_write()
134 if (!fc->blocked) in fuse_conn_max_background_write()
135 wake_up(&fc->blocked_waitq); in fuse_conn_max_background_write()
136 spin_unlock(&fc->bg_lock); in fuse_conn_max_background_write()
137 fuse_conn_put(fc); in fuse_conn_max_background_write()
148 struct fuse_conn *fc; in fuse_conn_congestion_threshold_read() local
151 fc = fuse_ctl_file_conn_get(file); in fuse_conn_congestion_threshold_read()
152 if (!fc) in fuse_conn_congestion_threshold_read()
155 val = READ_ONCE(fc->congestion_threshold); in fuse_conn_congestion_threshold_read()
156 fuse_conn_put(fc); in fuse_conn_congestion_threshold_read()
166 struct fuse_conn *fc; in fuse_conn_congestion_threshold_write() local
173 fc = fuse_ctl_file_conn_get(file); in fuse_conn_congestion_threshold_write()
174 if (!fc) in fuse_conn_congestion_threshold_write()
177 WRITE_ONCE(fc->congestion_threshold, val); in fuse_conn_congestion_threshold_write()
178 fuse_conn_put(fc); in fuse_conn_congestion_threshold_write()
206 struct fuse_conn *fc, in fuse_ctl_add_dentry() argument
215 BUG_ON(fc->ctl_ndents >= FUSE_CTL_NUM_DENTRIES); in fuse_ctl_add_dentry()
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()
239 fc->ctl_dentry[fc->ctl_ndents++] = dentry; in fuse_ctl_add_dentry()
248 int fuse_ctl_add_conn(struct fuse_conn *fc) in fuse_ctl_add_conn() argument
253 if (!fuse_control_sb || fc->no_control) in fuse_ctl_add_conn()
258 sprintf(name, "%u", fc->dev); in fuse_ctl_add_conn()
259 parent = fuse_ctl_add_dentry(parent, fc, name, S_IFDIR | 0500, 2, in fuse_ctl_add_conn()
265 if (!fuse_ctl_add_dentry(parent, fc, "waiting", S_IFREG | 0400, 1, in fuse_ctl_add_conn()
267 !fuse_ctl_add_dentry(parent, fc, "abort", S_IFREG | 0200, 1, in fuse_ctl_add_conn()
269 !fuse_ctl_add_dentry(parent, fc, "max_background", S_IFREG | 0600, in fuse_ctl_add_conn()
271 !fuse_ctl_add_dentry(parent, fc, "congestion_threshold", in fuse_ctl_add_conn()
279 fuse_ctl_remove_conn(fc); in fuse_ctl_add_conn()
287 void fuse_ctl_remove_conn(struct fuse_conn *fc) in fuse_ctl_remove_conn() argument
291 if (!fuse_control_sb || fc->no_control) in fuse_ctl_remove_conn()
294 for (i = fc->ctl_ndents - 1; i >= 0; i--) { in fuse_ctl_remove_conn()
295 struct dentry *dentry = fc->ctl_dentry[i]; 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()
349 struct fuse_conn *fc; in fuse_ctl_kill_sb() local
353 list_for_each_entry(fc, &fuse_conn_list, entry) in fuse_ctl_kill_sb()
354 fc->ctl_ndents = 0; in fuse_ctl_kill_sb()