diff options
author | Tejun Heo <tj@kernel.org> | 2013-11-28 14:54:23 -0500 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2013-11-29 20:41:35 -0500 |
commit | a7dc66dfb4c6d6c1d7c14d5106ce467f1dbd4eba (patch) | |
tree | 013752fe5b620dd8bda9318bd1156941c5995de3 /fs/sysfs/group.c | |
parent | 471bd7b78bd56c580e91e00a0f656ca922ab3b3c (diff) |
sysfs, kernfs: remove SYSFS_KOBJ_BIN_ATTR
After kernfs_ops and sysfs_dirent->s_attr.size addition, the
distinction between SYSFS_KOBJ_BIN_ATTR and SYSFS_KOBJ_ATTR is only
necessary while creating files to decide which kernfs_ops to use.
Afterwards, they behave exactly the same.
This patch removes SYSFS_KOBJ_BIN_ATTR along with sysfs_is_bin().
sysfs_add_file[_mode_ns]() are updated to take bool @is_bin instead of
@type.
This patch doesn't introduce any behavior changes. This completely
isolates the distinction between the two sysfs file types in the sysfs
layer proper.
Signed-off-by: Tejun Heo <tj@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'fs/sysfs/group.c')
-rw-r--r-- | fs/sysfs/group.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/fs/sysfs/group.c b/fs/sysfs/group.c index 065689ddb4cb..9f65cd97a2d7 100644 --- a/fs/sysfs/group.c +++ b/fs/sysfs/group.c | |||
@@ -55,8 +55,7 @@ static int create_files(struct sysfs_dirent *dir_sd, struct kobject *kobj, | |||
55 | if (!mode) | 55 | if (!mode) |
56 | continue; | 56 | continue; |
57 | } | 57 | } |
58 | error = sysfs_add_file_mode_ns(dir_sd, *attr, | 58 | error = sysfs_add_file_mode_ns(dir_sd, *attr, false, |
59 | SYSFS_KOBJ_ATTR, | ||
60 | (*attr)->mode | mode, | 59 | (*attr)->mode | mode, |
61 | NULL); | 60 | NULL); |
62 | if (unlikely(error)) | 61 | if (unlikely(error)) |
@@ -269,7 +268,7 @@ int sysfs_merge_group(struct kobject *kobj, | |||
269 | return -ENOENT; | 268 | return -ENOENT; |
270 | 269 | ||
271 | for ((i = 0, attr = grp->attrs); *attr && !error; (++i, ++attr)) | 270 | for ((i = 0, attr = grp->attrs); *attr && !error; (++i, ++attr)) |
272 | error = sysfs_add_file(dir_sd, *attr, SYSFS_KOBJ_ATTR); | 271 | error = sysfs_add_file(dir_sd, *attr, false); |
273 | if (error) { | 272 | if (error) { |
274 | while (--i >= 0) | 273 | while (--i >= 0) |
275 | kernfs_remove_by_name(dir_sd, (*--attr)->name); | 274 | kernfs_remove_by_name(dir_sd, (*--attr)->name); |