diff options
author | Tejun Heo <tj@kernel.org> | 2013-09-11 22:29:09 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2013-09-26 15:34:38 -0700 |
commit | cfec0bc835c84d3d3723d4955587f05a94879b26 (patch) | |
tree | 18c1239d9113ebc30ca037b1a0025b95ffb7c405 /fs/sysfs/symlink.c | |
parent | 388975cccaaf11abd47525f664c76891c440481a (diff) |
sysfs: @name comes before @ns
Some internal sysfs functions which take explicit namespace argument
are weird in that they place the optional @ns in front of @name which
is contrary to the established convention. This is confusing and
error-prone especially as @ns and @name may be interchanged without
causing compilation warning.
Swap the positions of @name and @ns in the following internal
functions.
sysfs_find_dirent()
sysfs_rename()
sysfs_hash_and_remove()
sysfs_name_hash()
sysfs_name_compare()
create_dir()
This patch doesn't introduce any functional changes.
Signed-off-by: Tejun Heo <tj@kernel.org>
Cc: Eric W. Biederman <ebiederm@xmission.com>
Cc: Kay Sievers <kay@vrfy.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'fs/sysfs/symlink.c')
-rw-r--r-- | fs/sysfs/symlink.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/fs/sysfs/symlink.c b/fs/sysfs/symlink.c index c96b31a1648..88c8bc5e891 100644 --- a/fs/sysfs/symlink.c +++ b/fs/sysfs/symlink.c @@ -144,7 +144,7 @@ void sysfs_delete_link(struct kobject *kobj, struct kobject *targ, if (targ->sd) ns = targ->sd->s_ns; spin_unlock(&sysfs_assoc_lock); - sysfs_hash_and_remove(kobj->sd, ns, name); + sysfs_hash_and_remove(kobj->sd, name, ns); } /** @@ -161,7 +161,7 @@ void sysfs_remove_link(struct kobject *kobj, const char *name) else parent_sd = kobj->sd; - sysfs_hash_and_remove(parent_sd, NULL, name); + sysfs_hash_and_remove(parent_sd, name, NULL); } EXPORT_SYMBOL_GPL(sysfs_remove_link); @@ -201,7 +201,7 @@ int sysfs_rename_link_ns(struct kobject *kobj, struct kobject *targ, if (sd->s_symlink.target_sd->s_dir.kobj != targ) goto out; - result = sysfs_rename(sd, parent_sd, new_ns, new); + result = sysfs_rename(sd, parent_sd, new, new_ns); out: sysfs_put(sd); |