sysfs: implement sysfs_find_dirent() and sysfs_get_dirent()
Implement sysfs_find_dirent() and sysfs_get_dirent(). sysfs_dirent_exist() is replaced by sysfs_find_dirent(). These will be used to make directory entries reclamiable. Signed-off-by: Tejun Heo <htejun@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
380e6fbb72
commit
f0b0af4792
@@ -421,7 +421,7 @@ int sysfs_add_file(struct dentry * dir, const struct attribute * attr, int type)
|
||||
|
||||
mutex_lock(&dir->d_inode->i_mutex);
|
||||
|
||||
if (sysfs_dirent_exist(parent_sd, attr->name)) {
|
||||
if (sysfs_find_dirent(parent_sd, attr->name)) {
|
||||
error = -EEXIST;
|
||||
goto out_unlock;
|
||||
}
|
||||
|
Reference in New Issue
Block a user