diff options
author | Tejun Heo <tj@kernel.org> | 2013-11-23 23:21:49 +0100 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2013-11-27 22:57:56 +0100 |
commit | 879f40d193bb3c6c13930e88e3e9d5d7baf84d19 (patch) | |
tree | b09863db44998ae61f572f816e93100cb56250cc /fs/sysfs/file.c | |
parent | sysfs, kernfs: add skeletons for kernfs (diff) | |
download | linux-879f40d193bb3c6c13930e88e3e9d5d7baf84d19.tar.xz linux-879f40d193bb3c6c13930e88e3e9d5d7baf84d19.zip |
sysfs, kernfs: introduce kernfs_remove[_by_name[_ns]]()
Introduce kernfs removal interfaces - kernfs_remove() and
kernfs_remove_by_name[_ns]().
These are just renames of sysfs_remove() and sysfs_hash_and_remove().
No functional changes.
v2: Dummy kernfs_remove_by_name_ns() for !CONFIG_SYSFS updated to
return -ENOSYS instead of 0.
Signed-off-by: Tejun Heo <tj@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'fs/sysfs/file.c')
-rw-r--r-- | fs/sysfs/file.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/fs/sysfs/file.c b/fs/sysfs/file.c index 79b5da2acbe1..5664410136ba 100644 --- a/fs/sysfs/file.c +++ b/fs/sysfs/file.c @@ -952,7 +952,7 @@ void sysfs_remove_file_ns(struct kobject *kobj, const struct attribute *attr, { struct sysfs_dirent *dir_sd = kobj->sd; - sysfs_hash_and_remove(dir_sd, attr->name, ns); + kernfs_remove_by_name_ns(dir_sd, attr->name, ns); } EXPORT_SYMBOL_GPL(sysfs_remove_file_ns); @@ -980,7 +980,7 @@ void sysfs_remove_file_from_group(struct kobject *kobj, else dir_sd = sysfs_get(kobj->sd); if (dir_sd) { - sysfs_hash_and_remove(dir_sd, attr->name, NULL); + kernfs_remove_by_name(dir_sd, attr->name); sysfs_put(dir_sd); } } @@ -1008,7 +1008,7 @@ EXPORT_SYMBOL_GPL(sysfs_create_bin_file); void sysfs_remove_bin_file(struct kobject *kobj, const struct bin_attribute *attr) { - sysfs_hash_and_remove(kobj->sd, attr->attr.name, NULL); + kernfs_remove_by_name(kobj->sd, attr->attr.name); } EXPORT_SYMBOL_GPL(sysfs_remove_bin_file); |