Lines Matching full:fsd
64 struct debugfs_fsdata *fsd; in __debugfs_file_get() local
77 fsd = d_fsd; in __debugfs_file_get()
85 fsd = kmalloc(sizeof(*fsd), GFP_KERNEL); in __debugfs_file_get()
86 if (!fsd) in __debugfs_file_get()
91 ops = fsd->short_fops = DEBUGFS_I(inode)->short_fops; in __debugfs_file_get()
98 fsd->real_fops = NULL; in __debugfs_file_get()
101 ops = fsd->real_fops = DEBUGFS_I(inode)->real_fops; in __debugfs_file_get()
112 fsd->short_fops = NULL; in __debugfs_file_get()
114 fsd->methods = methods; in __debugfs_file_get()
115 refcount_set(&fsd->active_users, 1); in __debugfs_file_get()
116 init_completion(&fsd->active_users_drained); in __debugfs_file_get()
117 INIT_LIST_HEAD(&fsd->cancellations); in __debugfs_file_get()
118 mutex_init(&fsd->cancellations_mtx); in __debugfs_file_get()
120 d_fsd = cmpxchg(&dentry->d_fsdata, NULL, fsd); in __debugfs_file_get()
122 mutex_destroy(&fsd->cancellations_mtx); in __debugfs_file_get()
123 kfree(fsd); in __debugfs_file_get()
124 fsd = d_fsd; in __debugfs_file_get()
139 if (!refcount_inc_not_zero(&fsd->active_users)) in __debugfs_file_get()
177 struct debugfs_fsdata *fsd = READ_ONCE(dentry->d_fsdata); in debugfs_file_put() local
179 if (refcount_dec_and_test(&fsd->active_users)) in debugfs_file_put()
180 complete(&fsd->active_users_drained); in debugfs_file_put()
209 struct debugfs_fsdata *fsd; in debugfs_enter_cancellation() local
220 fsd = READ_ONCE(dentry->d_fsdata); in debugfs_enter_cancellation()
221 if (WARN_ON(!fsd)) in debugfs_enter_cancellation()
224 mutex_lock(&fsd->cancellations_mtx); in debugfs_enter_cancellation()
225 list_add(&cancellation->list, &fsd->cancellations); in debugfs_enter_cancellation()
226 mutex_unlock(&fsd->cancellations_mtx); in debugfs_enter_cancellation()
230 complete(&fsd->active_users_drained); in debugfs_enter_cancellation()
245 struct debugfs_fsdata *fsd; in debugfs_leave_cancellation() local
251 fsd = READ_ONCE(dentry->d_fsdata); in debugfs_leave_cancellation()
252 if (WARN_ON(!fsd)) in debugfs_leave_cancellation()
255 mutex_lock(&fsd->cancellations_mtx); in debugfs_leave_cancellation()
258 mutex_unlock(&fsd->cancellations_mtx); in debugfs_leave_cancellation()
335 struct debugfs_fsdata *fsd = dentry->d_fsdata; \
338 if (!(fsd->methods & bit)) \
343 r = fsd->real_fops->name(args); \
352 struct debugfs_fsdata *fsd = dentry->d_fsdata; \
355 if (!(fsd->methods & bit)) \
360 r = fsd->short_fops->name(args); \
401 struct debugfs_fsdata *fsd = dentry->d_fsdata; in full_proxy_poll() local
404 if (!(fsd->methods & HAS_POLL)) in full_proxy_poll()
409 r = fsd->real_fops->poll(filp, wait); in full_proxy_poll()
416 struct debugfs_fsdata *fsd = F_DENTRY(file)->d_fsdata; in full_proxy_release() local
417 const struct file_operations *real_fops = fsd->real_fops; in full_proxy_release()
437 struct debugfs_fsdata *fsd; in full_proxy_open_regular() local
444 fsd = dentry->d_fsdata; in full_proxy_open_regular()
445 real_fops = fsd->real_fops; in full_proxy_open_regular()