sysfs: reference sysfs_dirent from sysfs inodes
authorEric W. Biederman <ebiederm@aristanetworks.com>
Wed, 11 Feb 2009 21:20:23 +0000 (13:20 -0800)
committerGreg Kroah-Hartman <gregkh@suse.de>
Tue, 24 Mar 2009 23:38:25 +0000 (16:38 -0700)
commit04256b4a8fc73f54cd14f20867882c299728a446
tree16267f6c77e0fa9f7229a30f66343289b6d1108a
parent425cb02912d1095febfeaf8d379af7b2ac9e4a89
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>
fs/sysfs/inode.c
fs/sysfs/mount.c
fs/sysfs/sysfs.h