Lines Matching refs:sd
81 extern const unsigned char * configfs_get_name(struct configfs_dirent *sd);
82 extern void configfs_drop_dentry(struct configfs_dirent *sd, struct dentry *parent);
112 struct configfs_dirent * sd = dentry->d_fsdata; in to_item() local
113 return ((struct config_item *) sd->s_element); in to_item()
118 struct configfs_dirent * sd = dentry->d_fsdata; in to_attr() local
119 return ((struct configfs_attribute *) sd->s_element); in to_attr()
128 struct configfs_dirent * sd = dentry->d_fsdata; in configfs_get_config_item() local
129 if (sd->s_type & CONFIGFS_ITEM_LINK) { in configfs_get_config_item()
130 struct configfs_symlink * sl = sd->s_element; in configfs_get_config_item()
133 item = config_item_get(sd->s_element); in configfs_get_config_item()
140 static inline void release_configfs_dirent(struct configfs_dirent * sd) in release_configfs_dirent() argument
142 if (!(sd->s_type & CONFIGFS_ROOT)) { in release_configfs_dirent()
143 kfree(sd->s_iattr); in release_configfs_dirent()
144 kmem_cache_free(configfs_dir_cachep, sd); in release_configfs_dirent()
148 static inline struct configfs_dirent * configfs_get(struct configfs_dirent * sd) in configfs_get() argument
150 if (sd) { in configfs_get()
151 WARN_ON(!atomic_read(&sd->s_count)); in configfs_get()
152 atomic_inc(&sd->s_count); in configfs_get()
154 return sd; in configfs_get()
157 static inline void configfs_put(struct configfs_dirent * sd) in configfs_put() argument
159 WARN_ON(!atomic_read(&sd->s_count)); in configfs_put()
160 if (atomic_dec_and_test(&sd->s_count)) in configfs_put()
161 release_configfs_dirent(sd); in configfs_put()