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
174 fc = fuse_ctl_file_conn_get(file); in fuse_conn_congestion_threshold_write()
175 if (!fc) in fuse_conn_congestion_threshold_write()
178 down_read(&fc->killsb); in fuse_conn_congestion_threshold_write()
179 spin_lock(&fc->bg_lock); in fuse_conn_congestion_threshold_write()
180 fc->congestion_threshold = val; in fuse_conn_congestion_threshold_write()
187 if (!list_empty(&fc->mounts)) { in fuse_conn_congestion_threshold_write()
188 fm = list_first_entry(&fc->mounts, struct fuse_mount, fc_entry); in fuse_conn_congestion_threshold_write()
189 if (fc->num_background < fc->congestion_threshold) { in fuse_conn_congestion_threshold_write()
197 spin_unlock(&fc->bg_lock); in fuse_conn_congestion_threshold_write()
198 up_read(&fc->killsb); in fuse_conn_congestion_threshold_write()
199 fuse_conn_put(fc); in fuse_conn_congestion_threshold_write()
231 struct fuse_conn *fc, in fuse_ctl_add_dentry() argument
240 BUG_ON(fc->ctl_ndents >= FUSE_CTL_NUM_DENTRIES); in fuse_ctl_add_dentry()
253 inode->i_uid = fc->user_id; in fuse_ctl_add_dentry()
254 inode->i_gid = fc->group_id; in fuse_ctl_add_dentry()
261 inode->i_private = fc; in fuse_ctl_add_dentry()
264 fc->ctl_dentry[fc->ctl_ndents++] = dentry; in fuse_ctl_add_dentry()
273 int fuse_ctl_add_conn(struct fuse_conn *fc) in fuse_ctl_add_conn() argument
283 sprintf(name, "%u", fc->dev); in fuse_ctl_add_conn()
284 parent = fuse_ctl_add_dentry(parent, fc, name, S_IFDIR | 0500, 2, in fuse_ctl_add_conn()
290 if (!fuse_ctl_add_dentry(parent, fc, "waiting", S_IFREG | 0400, 1, in fuse_ctl_add_conn()
292 !fuse_ctl_add_dentry(parent, fc, "abort", S_IFREG | 0200, 1, in fuse_ctl_add_conn()
294 !fuse_ctl_add_dentry(parent, fc, "max_background", S_IFREG | 0600, in fuse_ctl_add_conn()
296 !fuse_ctl_add_dentry(parent, fc, "congestion_threshold", in fuse_ctl_add_conn()
304 fuse_ctl_remove_conn(fc); in fuse_ctl_add_conn()
312 void fuse_ctl_remove_conn(struct fuse_conn *fc) in fuse_ctl_remove_conn() argument
319 for (i = fc->ctl_ndents - 1; i >= 0; i--) { in fuse_ctl_remove_conn()
320 struct dentry *dentry = fc->ctl_dentry[i]; in fuse_ctl_remove_conn()
334 struct fuse_conn *fc; in fuse_ctl_fill_super() local
344 list_for_each_entry(fc, &fuse_conn_list, entry) { in fuse_ctl_fill_super()
345 err = fuse_ctl_add_conn(fc); in fuse_ctl_fill_super()
374 struct fuse_conn *fc; in fuse_ctl_kill_sb() local
378 list_for_each_entry(fc, &fuse_conn_list, entry) in fuse_ctl_kill_sb()
379 fc->ctl_ndents = 0; in fuse_ctl_kill_sb()