sysfs: Use dentry_ops instead of directly playing with the dcache
authorEric W. Biederman <ebiederm@xmission.com>
Sun, 8 Nov 2009 07:27:01 +0000 (23:27 -0800)
committerGreg Kroah-Hartman <gregkh@suse.de>
Fri, 11 Dec 2009 19:24:53 +0000 (11:24 -0800)
commite8f077c8831528e2ec1ea6c8ba090e405fdcd0b7
tree707b25f1368d59d7d945ae46d2139f6592120a8e
parent28a027cfc0d527fcc31bfeac1d94d572c68847d1
sysfs: Use dentry_ops instead of directly playing with the dcache

Calling d_drop unconditionally when a sysfs_dirent is deleted has
the potential to leak mounts, so instead implement dentry delete
and revalidate operations that cause sysfs dentries to be removed
at the appropriate time.

Acked-by: Tejun Heo <tj@kernel.org>
Acked-by: Serge Hallyn <serue@us.ibm.com>
Signed-off-by: Eric W. Biederman <ebiederm@aristanetworks.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
fs/sysfs/dir.c