Lines Matching refs:fsd
51 struct debugfs_fsdata *fsd = F_DENTRY(filp)->d_fsdata; in debugfs_real_fops() local
53 if ((unsigned long)fsd & DEBUGFS_FSDATA_IS_REAL_FOPS_BIT) { in debugfs_real_fops()
62 return fsd->real_fops; in debugfs_real_fops()
83 struct debugfs_fsdata *fsd; in debugfs_file_get() local
88 fsd = d_fsd; in debugfs_file_get()
90 fsd = kmalloc(sizeof(*fsd), GFP_KERNEL); in debugfs_file_get()
91 if (!fsd) in debugfs_file_get()
94 fsd->real_fops = (void *)((unsigned long)d_fsd & in debugfs_file_get()
96 refcount_set(&fsd->active_users, 1); in debugfs_file_get()
97 init_completion(&fsd->active_users_drained); in debugfs_file_get()
98 if (cmpxchg(&dentry->d_fsdata, d_fsd, fsd) != d_fsd) { in debugfs_file_get()
99 kfree(fsd); in debugfs_file_get()
100 fsd = READ_ONCE(dentry->d_fsdata); in debugfs_file_get()
115 if (!refcount_inc_not_zero(&fsd->active_users)) in debugfs_file_get()
133 struct debugfs_fsdata *fsd = READ_ONCE(dentry->d_fsdata); in debugfs_file_put() local
135 if (refcount_dec_and_test(&fsd->active_users)) in debugfs_file_put()
136 complete(&fsd->active_users_drained); in debugfs_file_put()