diff options
author | Eric W. Biederman <ebiederm@aristanetworks.com> | 2009-02-11 13:20:23 -0800 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2009-03-24 16:38:25 -0700 |
commit | 04256b4a8fc73f54cd14f20867882c299728a446 (patch) | |
tree | 16267f6c77e0fa9f7229a30f66343289b6d1108a /fs/sysfs/mount.c | |
parent | 425cb02912d1095febfeaf8d379af7b2ac9e4a89 (diff) | |
download | linux-04256b4a8fc73f54cd14f20867882c299728a446.tar.gz linux-04256b4a8fc73f54cd14f20867882c299728a446.tar.bz2 linux-04256b4a8fc73f54cd14f20867882c299728a446.zip |
sysfs: reference sysfs_dirent from sysfs inodes
The sysfs_dirent serves as both an inode and a directory entry
for sysfs. To prevent the sysfs inode numbers from being freed
prematurely hold a reference to sysfs_dirent from the sysfs inode.
[akpm@linux-foundation.org: add comment]
Signed-off-by: Eric W. Biederman <ebiederm@aristanetworks.com>
Cc: Tejun Heo <tj@kernel.org>
Cc: Al Viro <viro@ZenIV.linux.org.uk>
Cc: Cornelia Huck <cornelia.huck@de.ibm.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'fs/sysfs/mount.c')
-rw-r--r-- | fs/sysfs/mount.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/fs/sysfs/mount.c b/fs/sysfs/mount.c index 84ef378673a8..49749955ccaf 100644 --- a/fs/sysfs/mount.c +++ b/fs/sysfs/mount.c @@ -29,6 +29,7 @@ struct kmem_cache *sysfs_dir_cachep; static const struct super_operations sysfs_ops = { .statfs = simple_statfs, .drop_inode = generic_delete_inode, + .delete_inode = sysfs_delete_inode, }; struct sysfs_dirent sysfs_root = { |