Lines Matching refs:fsd

226 	struct debugfs_fsdata *fsd = dentry->d_fsdata;  in debugfs_release_dentry()  local
228 if ((unsigned long)fsd & DEBUGFS_FSDATA_IS_REAL_FOPS_BIT) in debugfs_release_dentry()
232 if (fsd && fsd->real_fops) { in debugfs_release_dentry()
233 WARN_ON(!list_empty(&fsd->cancellations)); in debugfs_release_dentry()
234 mutex_destroy(&fsd->cancellations_mtx); in debugfs_release_dentry()
237 kfree(fsd); in debugfs_release_dentry()
242 struct debugfs_fsdata *fsd = path->dentry->d_fsdata; in debugfs_automount() local
244 return fsd->automount(path->dentry, d_inode(path->dentry)->i_private); in debugfs_automount()
641 struct debugfs_fsdata *fsd; in debugfs_create_automount() local
647 fsd = kzalloc(sizeof(*fsd), GFP_KERNEL); in debugfs_create_automount()
648 if (!fsd) { in debugfs_create_automount()
653 fsd->automount = f; in debugfs_create_automount()
657 kfree(fsd); in debugfs_create_automount()
665 kfree(fsd); in debugfs_create_automount()
672 dentry->d_fsdata = fsd; in debugfs_create_automount()
737 struct debugfs_fsdata *fsd; in __debugfs_file_removed() local
746 fsd = READ_ONCE(dentry->d_fsdata); in __debugfs_file_removed()
747 if ((unsigned long)fsd & DEBUGFS_FSDATA_IS_REAL_FOPS_BIT) in __debugfs_file_removed()
751 if (refcount_dec_and_test(&fsd->active_users)) in __debugfs_file_removed()
772 while (refcount_read(&fsd->active_users)) { in __debugfs_file_removed()
785 mutex_lock(&fsd->cancellations_mtx); in __debugfs_file_removed()
786 while ((c = list_first_entry_or_null(&fsd->cancellations, in __debugfs_file_removed()
791 mutex_unlock(&fsd->cancellations_mtx); in __debugfs_file_removed()
793 wait_for_completion(&fsd->active_users_drained); in __debugfs_file_removed()