]> bbs.cooldavid.org Git - net-next-2.6.git/commit - fs/sysfs/mount.c
sysfs: make directory dentries and inodes reclaimable
authorTejun Heo <htejun@gmail.com>
Wed, 13 Jun 2007 19:27:25 +0000 (04:27 +0900)
committerGreg Kroah-Hartman <gregkh@suse.de>
Wed, 11 Jul 2007 23:09:09 +0000 (16:09 -0700)
commit51225039f3cf9d250596d1344494b293274b9169
tree4e646ab37043068824a146c7353c6242a4eb72df
parent53e0ae92690c52eceb997905d85fbb42de5fff63
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>
fs/sysfs/dir.c
fs/sysfs/file.c
fs/sysfs/mount.c
fs/sysfs/sysfs.h
include/linux/sysfs.h