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
89 fsd = d_fsd; in debugfs_file_get()
91 fsd = kmalloc(sizeof(*fsd), GFP_KERNEL); in debugfs_file_get()
92 if (!fsd) in debugfs_file_get()
95 fsd->real_fops = (void *)((unsigned long)d_fsd & in debugfs_file_get()
97 refcount_set(&fsd->active_users, 1); in debugfs_file_get()
98 init_completion(&fsd->active_users_drained); in debugfs_file_get()
99 if (cmpxchg(&dentry->d_fsdata, d_fsd, fsd) != d_fsd) { in debugfs_file_get()
100 kfree(fsd); in debugfs_file_get()
101 fsd = READ_ONCE(dentry->d_fsdata); in debugfs_file_get()
116 if (!refcount_inc_not_zero(&fsd->active_users)) in debugfs_file_get()
134 struct debugfs_fsdata *fsd = READ_ONCE(dentry->d_fsdata); in debugfs_file_put() local
136 if (refcount_dec_and_test(&fsd->active_users)) in debugfs_file_put()
137 complete(&fsd->active_users_drained); in debugfs_file_put()