sysfs: make directory dentries and inodes reclaimable
This patch makes dentries and inodes for sysfs directories reclaimable. * sysfs_notify() is modified to walk sysfs_dirent tree instead of dentry tree. * sysfs_update_file() and sysfs_chmod_file() use sysfs_get_dentry() to grab the victim dentry. * sysfs_rename_dir() and sysfs_move_dir() grab all dentries using sysfs_get_dentry() on startup. * Dentries for all shadowed directories are pinned in memory to serve as lookup start point. Signed-off-by:Tejun Heo <htejun@gmail.com> Signed-off-by:
Greg Kroah-Hartman <gregkh@suse.de>
Showing
- fs/sysfs/dir.c 126 additions, 105 deletionsfs/sysfs/dir.c
- fs/sysfs/file.c 59 additions, 75 deletionsfs/sysfs/file.c
- fs/sysfs/mount.c 1 addition, 1 deletionfs/sysfs/mount.c
- fs/sysfs/sysfs.h 1 addition, 0 deletionsfs/sysfs/sysfs.h
- include/linux/sysfs.h 0 additions, 1 deletioninclude/linux/sysfs.h
Please register or sign in to comment