sysfs: Rewrite rename in terms of sysfs dirents
authorEric W. Biederman <ebiederm@xmission.com>
Mon, 20 Aug 2007 12:36:31 +0000 (21:36 +0900)
committerGreg Kroah-Hartman <gregkh@suse.de>
Fri, 12 Oct 2007 21:51:08 +0000 (14:51 -0700)
commit9918f9a4817cb6241c727b434d5f8ec5564198de
tree76fa5f03994d22e580623baa04ba62c070b94c42
parent5a26b79c426f8e55ebf7204cb138eb6b1645d4d3
sysfs: Rewrite rename in terms of sysfs dirents

This patch rewrites sysfs_rename_dir to perform it's checks
as much as possible on the underlying sysfs_dirents instead
of the contents of the dcache.  It turns out that this version
is a little simpler, and a little more like the rest of
the sysfs directory modification code.

tj: fixed double locking of sysfs_mutex

Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
Signed-off-by: Tejun Heo <htejun@gmail.com>
Cc: Cornelia Huck <cornelia.huck@de.ibm.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
fs/sysfs/dir.c