Lines Matching refs:fsd
50 struct debugfs_fsdata *fsd = F_DENTRY(filp)->d_fsdata; in debugfs_real_fops() local
52 if ((unsigned long)fsd & DEBUGFS_FSDATA_IS_REAL_FOPS_BIT) { in debugfs_real_fops()
61 return fsd->real_fops; in debugfs_real_fops()
82 struct debugfs_fsdata *fsd; in debugfs_file_get() local
87 fsd = d_fsd; in debugfs_file_get()
89 fsd = kmalloc(sizeof(*fsd), GFP_KERNEL); in debugfs_file_get()
90 if (!fsd) in debugfs_file_get()
93 fsd->real_fops = (void *)((unsigned long)d_fsd & in debugfs_file_get()
95 refcount_set(&fsd->active_users, 1); in debugfs_file_get()
96 init_completion(&fsd->active_users_drained); in debugfs_file_get()
97 if (cmpxchg(&dentry->d_fsdata, d_fsd, fsd) != d_fsd) { in debugfs_file_get()
98 kfree(fsd); in debugfs_file_get()
99 fsd = READ_ONCE(dentry->d_fsdata); in debugfs_file_get()
114 if (!refcount_inc_not_zero(&fsd->active_users)) in debugfs_file_get()
132 struct debugfs_fsdata *fsd = READ_ONCE(dentry->d_fsdata); in debugfs_file_put() local
134 if (refcount_dec_and_test(&fsd->active_users)) in debugfs_file_put()
135 complete(&fsd->active_users_drained); in debugfs_file_put()