summaryrefslogtreecommitdiffstats
path: root/fs/sysfs/sysfs.h
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2021-09-13 07:41:12 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2021-09-14 16:59:46 +0200
commit5cf3bb0d3a2d0de94f3f551f0e4211068818aabf (patch)
tree91065bdd7f4c5e74a1da37bf8b67f76190271c72 /fs/sysfs/sysfs.h
parentkernfs: remove the unused lockdep_key field in struct kernfs_ops (diff)
downloadlinux-5cf3bb0d3a2d0de94f3f551f0e4211068818aabf.tar.xz
linux-5cf3bb0d3a2d0de94f3f551f0e4211068818aabf.zip
sysfs: split out binary attribute handling from sysfs_add_file_mode_ns
Split adding binary attributes into a separate handler instead of overloading sysfs_add_file_mode_ns. Acked-by: Christian Brauner <christian.brauner@ubuntu.com> Acked-by: Tejun Heo <tj@kernel.org> Signed-off-by: Christoph Hellwig <hch@lst.de> Link: https://lore.kernel.org/r/20210913054121.616001-5-hch@lst.de Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'fs/sysfs/sysfs.h')
-rw-r--r--fs/sysfs/sysfs.h8
1 files changed, 5 insertions, 3 deletions
diff --git a/fs/sysfs/sysfs.h b/fs/sysfs/sysfs.h
index 0050cc0c0236..3f28c9af5756 100644
--- a/fs/sysfs/sysfs.h
+++ b/fs/sysfs/sysfs.h
@@ -28,9 +28,11 @@ void sysfs_warn_dup(struct kernfs_node *parent, const char *name);
* file.c
*/
int sysfs_add_file_mode_ns(struct kernfs_node *parent,
- const struct attribute *attr, bool is_bin,
- umode_t amode, kuid_t uid, kgid_t gid,
- const void *ns);
+ const struct attribute *attr, umode_t amode, kuid_t uid,
+ kgid_t gid, const void *ns);
+int sysfs_add_bin_file_mode_ns(struct kernfs_node *parent,
+ const struct bin_attribute *battr, umode_t mode,
+ kuid_t uid, kgid_t gid, const void *ns);
/*
* symlink.c