diff options
author | Tejun Heo <htejun@gmail.com> | 2007-06-13 15:27:25 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2007-07-11 19:09:09 -0400 |
commit | 51225039f3cf9d250596d1344494b293274b9169 (patch) | |
tree | 4e646ab37043068824a146c7353c6242a4eb72df /fs/sysfs/mount.c | |
parent | 53e0ae92690c52eceb997905d85fbb42de5fff63 (diff) |
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>
Diffstat (limited to 'fs/sysfs/mount.c')
-rw-r--r-- | fs/sysfs/mount.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/sysfs/mount.c b/fs/sysfs/mount.c index 078537e5d696..402cc356203c 100644 --- a/fs/sysfs/mount.c +++ b/fs/sysfs/mount.c | |||
@@ -24,7 +24,7 @@ static const struct super_operations sysfs_ops = { | |||
24 | .drop_inode = sysfs_delete_inode, | 24 | .drop_inode = sysfs_delete_inode, |
25 | }; | 25 | }; |
26 | 26 | ||
27 | static struct sysfs_dirent sysfs_root = { | 27 | struct sysfs_dirent sysfs_root = { |
28 | .s_count = ATOMIC_INIT(1), | 28 | .s_count = ATOMIC_INIT(1), |
29 | .s_flags = SYSFS_ROOT, | 29 | .s_flags = SYSFS_ROOT, |
30 | .s_mode = S_IFDIR | S_IRWXU | S_IRUGO | S_IXUGO, | 30 | .s_mode = S_IFDIR | S_IRWXU | S_IRUGO | S_IXUGO, |