mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-06-22 06:32:08 +00:00
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:
parent
380e6fbb72
commit
f0b0af4792
4 changed files with 50 additions and 20 deletions
|
@ -95,7 +95,7 @@ int sysfs_create_link(struct kobject * kobj, struct kobject * target, const char
|
|||
return -ENOENT;
|
||||
|
||||
mutex_lock(&dentry->d_inode->i_mutex);
|
||||
if (!sysfs_dirent_exist(dentry->d_fsdata, name))
|
||||
if (!sysfs_find_dirent(dentry->d_fsdata, name))
|
||||
error = sysfs_add_link(parent_sd, name, target_sd);
|
||||
mutex_unlock(&dentry->d_inode->i_mutex);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue