Lines Matching full:fsd
52 struct debugfs_fsdata *fsd = F_DENTRY(filp)->d_fsdata; in debugfs_real_fops() local
54 if ((unsigned long)fsd & DEBUGFS_FSDATA_IS_REAL_FOPS_BIT) { in debugfs_real_fops()
63 return fsd->real_fops; in debugfs_real_fops()
84 struct debugfs_fsdata *fsd; in debugfs_file_get() local
97 fsd = d_fsd; in debugfs_file_get()
99 fsd = kmalloc(sizeof(*fsd), GFP_KERNEL); in debugfs_file_get()
100 if (!fsd) in debugfs_file_get()
103 fsd->real_fops = (void *)((unsigned long)d_fsd & in debugfs_file_get()
105 refcount_set(&fsd->active_users, 1); in debugfs_file_get()
106 init_completion(&fsd->active_users_drained); in debugfs_file_get()
107 if (cmpxchg(&dentry->d_fsdata, d_fsd, fsd) != d_fsd) { in debugfs_file_get()
108 kfree(fsd); in debugfs_file_get()
109 fsd = READ_ONCE(dentry->d_fsdata); in debugfs_file_get()
124 if (!refcount_inc_not_zero(&fsd->active_users)) in debugfs_file_get()
142 struct debugfs_fsdata *fsd = READ_ONCE(dentry->d_fsdata); in debugfs_file_put() local
144 if (refcount_dec_and_test(&fsd->active_users)) in debugfs_file_put()
145 complete(&fsd->active_users_drained); in debugfs_file_put()