[PATCH 0/2] fs: remove dev argument from file operations

Sascha Hauer s.hauer at pengutronix.de
Wed Oct 1 01:06:26 PDT 2025


All fs_driver operations like read, write and ioctl take a struct device *
argument which is mostly unused by the filesystem driver and for the few
cases where it was used the device can be retrieved from the file argument.

This series removes the dev argument and moves the the fs_driver
operation over to filesystem_operations.

This is done in preparation to support device special files later and
consequently retire devfs as a filesystem.

Signed-off-by: Sascha Hauer <s.hauer at pengutronix.de>
---
Sascha Hauer (2):
      fs: remove redundant dev argument from fs_driver operations
      fs: move fs_driver operations to struct file_operations

 fs/9p/v9fs.h           |  8 +++-----
 fs/9p/v9fs_vfs.h       |  2 +-
 fs/9p/vfs_addr.c       |  6 ++----
 fs/9p/vfs_dir.c        |  2 +-
 fs/9p/vfs_file.c       |  6 ++++++
 fs/9p/vfs_inode_dotl.c |  9 +--------
 fs/bpkfs.c             |  8 ++++----
 fs/cramfs/cramfs.c     |  9 +++++++--
 fs/devfs.c             | 42 +++++++++++++++++++---------------------
 fs/efi.c               |  9 ++++-----
 fs/efivarfs.c          |  8 +++-----
 fs/ext4/ext_barebox.c  |  8 ++++++--
 fs/fat/fat.c           | 19 ++++++++----------
 fs/fs.c                | 48 +++++++++++++++++++++++-----------------------
 fs/jffs2/fs.c          | 15 +++++++--------
 fs/legacy.c            | 52 ++++++++++++++++++++++++++++++++++++++++++++++++++
 fs/nfs.c               | 17 ++++++++---------
 fs/omap4_usbbootfs.c   |  3 +--
 fs/pstore/fs.c         |  8 ++++----
 fs/qemu_fw_cfg.c       | 27 +++++++++++++-------------
 fs/ramfs.c             | 20 ++++++++++---------
 fs/ratpfs.c            | 15 ++++++---------
 fs/smhfs.c             | 18 +++++++----------
 fs/squashfs/squashfs.c | 15 +++++++--------
 fs/tftp.c              | 19 +++++++++---------
 fs/ubifs/super.c       |  1 +
 fs/ubifs/ubifs.c       |  3 +--
 fs/ubifs/ubifs.h       |  1 +
 fs/uimagefs.c          | 15 +++++++--------
 include/fs.h           | 24 +++++------------------
 include/linux/fs.h     | 20 +++++++++++++++----
 31 files changed, 246 insertions(+), 211 deletions(-)
---
base-commit: 92d503132efc60305fb94d87e54a1214e1781dae
change-id: 20251001-fs-remove-dev-argument-38d1c2104871

Best regards,
-- 
Sascha Hauer <s.hauer at pengutronix.de>




More information about the barebox mailing list