sysfs: Factor out sysfs_rename from sysfs_rename_dir and sysfs_move_dir
authorEric W. Biederman <ebiederm@xmission.com>
Sat, 21 Nov 2009 00:08:57 +0000 (16:08 -0800)
committerGreg Kroah-Hartman <gregkh@suse.de>
Fri, 11 Dec 2009 19:24:54 +0000 (11:24 -0800)
commitca1bab38195d66bdf42320a99cc7359434a271d3
tree4394403b4a85fb269d052b7852b41ee0f7ba8a88
parent832b6af198aefe6034310e124594cc8b833c0ef9
sysfs: Factor out sysfs_rename from sysfs_rename_dir and sysfs_move_dir

These two functions do 90% of the same work and it doesn't significantly
obfuscate the function to allow both the parent dir and the name to change
at the same time.  So merge them together to simplify maintenance, and
increase testing.

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
fs/sysfs/sysfs.h