Lines Matching defs:fsd
52 struct debugfs_fsdata *fsd = F_DENTRY(filp)->d_fsdata;
54 if ((unsigned long)fsd & DEBUGFS_FSDATA_IS_REAL_FOPS_BIT) {
63 return fsd->real_fops;
84 struct debugfs_fsdata *fsd;
97 fsd = d_fsd;
99 fsd = kmalloc(sizeof(*fsd), GFP_KERNEL);
100 if (!fsd)
103 fsd->real_fops = (void *)((unsigned long)d_fsd &
105 refcount_set(&fsd->active_users, 1);
106 init_completion(&fsd->active_users_drained);
107 INIT_LIST_HEAD(&fsd->cancellations);
108 mutex_init(&fsd->cancellations_mtx);
110 if (cmpxchg(&dentry->d_fsdata, d_fsd, fsd) != d_fsd) {
111 mutex_destroy(&fsd->cancellations_mtx);
112 kfree(fsd);
113 fsd = READ_ONCE(dentry->d_fsdata);
128 if (!refcount_inc_not_zero(&fsd->active_users))
146 struct debugfs_fsdata *fsd = READ_ONCE(dentry->d_fsdata);
148 if (refcount_dec_and_test(&fsd->active_users))
149 complete(&fsd->active_users_drained);
178 struct debugfs_fsdata *fsd;
189 fsd = READ_ONCE(dentry->d_fsdata);
190 if (WARN_ON(!fsd ||
191 ((unsigned long)fsd & DEBUGFS_FSDATA_IS_REAL_FOPS_BIT)))
194 mutex_lock(&fsd->cancellations_mtx);
195 list_add(&cancellation->list, &fsd->cancellations);
196 mutex_unlock(&fsd->cancellations_mtx);
200 complete(&fsd->active_users_drained);
215 struct debugfs_fsdata *fsd;
221 fsd = READ_ONCE(dentry->d_fsdata);
222 if (WARN_ON(!fsd ||
223 ((unsigned long)fsd & DEBUGFS_FSDATA_IS_REAL_FOPS_BIT)))
226 mutex_lock(&fsd->cancellations_mtx);
229 mutex_unlock(&fsd->cancellations_mtx);