sysfs: add sysfs_dirent->s_name
Add s_name to sysfs_dirent. This is to further reduce dependency to the associated dentry. Name is copied for directories and symlinks but not for attributes. Where possible, name dereferences are converted to use sd->s_name. sysfs_symlink->link_name and sysfs_get_name() are unused now and removed. This change allows symlink to be implemented using sysfs_dirent tree proper, which is the last remaining dentry-dependent sysfs walk. Signed-off-by:Tejun Heo <htejun@gmail.com> Signed-off-by:
Greg Kroah-Hartman <gregkh@suse.de>
Showing
- fs/sysfs/dir.c 44 additions, 23 deletionsfs/sysfs/dir.c
- fs/sysfs/file.c 1 addition, 1 deletionfs/sysfs/file.c
- fs/sysfs/inode.c 1 addition, 32 deletionsfs/sysfs/inode.c
- fs/sysfs/symlink.c 1 addition, 7 deletionsfs/sysfs/symlink.c
- fs/sysfs/sysfs.h 3 additions, 4 deletionsfs/sysfs/sysfs.h
- include/linux/sysfs.h 1 addition, 0 deletionsinclude/linux/sysfs.h
Loading
Please register or sign in to comment