Skip to content

Commit 3124eb1

Browse files
htejungregkh
authored andcommitted
sysfs: merge regular and bin file handling
With the previous changes, sysfs regular file code is ready to handle bin files too. This patch makes bin files share the regular file path. * sysfs_create/remove_bin_file() are moved to fs/sysfs/file.c. * sysfs_init_inode() is updated to use the new sysfs_bin_operations instead of bin_fops for bin files. * fs/sysfs/bin.c and the related pieces are removed. This patch shouldn't introduce any behavior difference to bin file accesses. Overall, this unification reduces the amount of duplicate logic, makes behaviors more consistent and paves the road for building simpler and more versatile interface which will allow other subsystems to make use of sysfs for their pseudo filesystems. v2: Stale fs/sysfs/bin.c reference dropped from Documentation/DocBook/filesystems.tmpl. Reported by kbuild test robot. Signed-off-by: Tejun Heo <tj@kernel.org> Cc: Kay Sievers <kay@vrfy.org> Cc: kbuild test robot <fengguang.wu@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent 49fe604 commit 3124eb1

7 files changed

Lines changed: 28 additions & 502 deletions

File tree

‎Documentation/DocBook/filesystems.tmpl‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,6 @@
9191
<title>The Filesystem for Exporting Kernel Objects</title>
9292
!Efs/sysfs/file.c
9393
!Efs/sysfs/symlink.c
94-
!Efs/sysfs/bin.c
9594
</chapter>
9695

9796
<chapter id="debugfs">

‎fs/sysfs/Makefile‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,4 @@
22
# Makefile for the sysfs virtual filesystem
33
#
44

5-
obj-y := inode.o file.o dir.o symlink.o mount.o bin.o \
6-
group.o
5+
obj-y := inode.o file.o dir.o symlink.o mount.o group.o

0 commit comments

Comments
 (0)