AI Trajectory


Trajectory: (Expand/Collapse All)
Seq Timestamp Type Name Duration
0/0 2026/09/05 17:41 flow patch-triage
0m Args:
null

Results:
{
  "EnableConfigs": null,
  "FocusSymbols": [],
  "KMSANReasoning": "",
  "NeedsKMSAN": false,
  "Reasoning": "The patch completely removes the legacy BFS (Boot File System) filesystem implementation from the kernel, along with its documentation, Kconfig entries, defconfigs, and selftest references. As only code removal, documentation, and config/selftest cleanup are performed, there is no new or modified executable code to fuzz.",
  "WorthFuzzing": false
}

1/1 2026/09/05 17:41 action read-patch-diff
0m Args:
null

Results:
{
  "PatchDiff": "commit 40945d11f3969f04b46d0612a1bceca795855f83\nAuthor: syz-cluster \u003ctriage@syzkaller.com\u003e\nDate:   Sat Sep 5 17:41:40 2026 +0000\n\n    syz-cluster: applied patch under review\n\ndiff --git a/CREDITS b/CREDITS\nindex bba5071c29a5d..c570dd7eebbde 100644\n--- a/CREDITS\n+++ b/CREDITS\n@@ -57,7 +57,7 @@ S: Longford, Ireland\n S: Sydney, Australia\n \n N: Tigran A. Aivazian\n-E: tigran@aivazian.fsnet.co.uk\n+E: aivazian.tigran@gmail.com\n W: http://www.moses.uklinux.net/patches\n D: BFS filesystem\n D: Intel IA32 CPU microcode update support\ndiff --git a/Documentation/filesystems/befs.rst b/Documentation/filesystems/befs.rst\nindex a22f603b2938e..c1dbfe9c95d29 100644\n--- a/Documentation/filesystems/befs.rst\n+++ b/Documentation/filesystems/befs.rst\n@@ -44,8 +44,8 @@ implementation.\n Which is it, BFS or BEFS?\n =========================\n Be, Inc said, \"BeOS Filesystem is officially called BFS, not BeFS\".\n-But Unixware Boot Filesystem is called bfs, too. And they are already in\n-the kernel. Because of this naming conflict, on Linux the BeOS\n+But the UnixWare Boot Filesystem is called bfs, too, and it was already\n+in the kernel. Because of this naming conflict, on Linux the BeOS\n filesystem is called befs.\n \n How to Install\ndiff --git a/Documentation/filesystems/bfs.rst b/Documentation/filesystems/bfs.rst\ndeleted file mode 100644\nindex ce14b90188072..0000000000000\n--- a/Documentation/filesystems/bfs.rst\n+++ /dev/null\n@@ -1,60 +0,0 @@\n-.. SPDX-License-Identifier: GPL-2.0\n-\n-========================\n-BFS Filesystem for Linux\n-========================\n-\n-The BFS filesystem is used by SCO UnixWare OS for the /stand slice, which\n-usually contains the kernel image and a few other files required for the\n-boot process.\n-\n-In order to access /stand partition under Linux you obviously need to\n-know the partition number and the kernel must support UnixWare disk slices\n-(CONFIG_UNIXWARE_DISKLABEL config option). However BFS support does not\n-depend on having UnixWare disklabel support because one can also mount\n-BFS filesystem via loopback::\n-\n-    # losetup /dev/loop0 stand.img\n-    # mount -t bfs /dev/loop0 /mnt/stand\n-\n-where stand.img is a file containing the image of BFS filesystem.\n-When you have finished using it and umounted you need to also deallocate\n-/dev/loop0 device by::\n-\n-    # losetup -d /dev/loop0\n-\n-You can simplify mounting by just typing::\n-\n-    # mount -t bfs -o loop stand.img /mnt/stand\n-\n-this will allocate the first available loopback device (and load loop.o\n-kernel module if necessary) automatically. If the loopback driver is not\n-loaded automatically, make sure that you have compiled the module and\n-that modprobe is functioning. Beware that umount will not deallocate\n-/dev/loopN device if /etc/mtab file on your system is a symbolic link to\n-/proc/mounts. You will need to do it manually using \"-d\" switch of\n-losetup(8). Read losetup(8) manpage for more info.\n-\n-To create the BFS image under UnixWare you need to find out first which\n-slice contains it. The command prtvtoc(1M) is your friend::\n-\n-    # prtvtoc /dev/rdsk/c0b0t0d0s0\n-\n-(assuming your root disk is on target=0, lun=0, bus=0, controller=0). Then you\n-look for the slice with tag \"STAND\", which is usually slice 10. With this\n-information you can use dd(1) to create the BFS image::\n-\n-    # umount /stand\n-    # dd if=/dev/rdsk/c0b0t0d0sa of=stand.img bs=512\n-\n-Just in case, you can verify that you have done the right thing by checking\n-the magic number::\n-\n-    # od -Ad -tx4 stand.img | more\n-\n-The first 4 bytes should be 0x1badface.\n-\n-If you have any patches, questions or suggestions regarding this BFS\n-implementation please contact the author:\n-\n-Tigran Aivazian \u003caivazian.tigran@gmail.com\u003e\ndiff --git a/Documentation/filesystems/index.rst b/Documentation/filesystems/index.rst\nindex 734a45e516675..7cce7cc28d126 100644\n--- a/Documentation/filesystems/index.rst\n+++ b/Documentation/filesystems/index.rst\n@@ -75,7 +75,6 @@ Documentation for filesystem implementations.\n    autofs\n    autofs-mount-control\n    befs\n-   bfs\n    btrfs\n    ceph\n    coda\ndiff --git a/MAINTAINERS b/MAINTAINERS\nindex fc320b373656f..385309556705e 100644\n--- a/MAINTAINERS\n+++ b/MAINTAINERS\n@@ -4627,13 +4627,6 @@ S:\tOdd Fixes\n F:\tDocumentation/block/bfq-iosched.rst\n F:\tblock/bfq-*\n \n-BFS FILE SYSTEM\n-M:\t\"Tigran A. Aivazian\" \u003caivazian.tigran@gmail.com\u003e\n-S:\tMaintained\n-F:\tDocumentation/filesystems/bfs.rst\n-F:\tfs/bfs/\n-F:\tinclude/uapi/linux/bfs_fs.h\n-\n BITMAP API\n M:\tYury Norov \u003cyury.norov@gmail.com\u003e\n R:\tRasmus Villemoes \u003clinux@rasmusvillemoes.dk\u003e\ndiff --git a/arch/mips/configs/malta_defconfig b/arch/mips/configs/malta_defconfig\nindex 56a8f76dab414..4fb4d45f3cdce 100644\n--- a/arch/mips/configs/malta_defconfig\n+++ b/arch/mips/configs/malta_defconfig\n@@ -333,7 +333,6 @@ CONFIG_AFFS_FS=m\n CONFIG_HFS_FS=m\n CONFIG_HFSPLUS_FS=m\n CONFIG_BEFS_FS=m\n-CONFIG_BFS_FS=m\n CONFIG_EFS_FS=m\n CONFIG_JFFS2_FS=m\n CONFIG_JFFS2_FS_XATTR=y\ndiff --git a/arch/mips/configs/malta_kvm_defconfig b/arch/mips/configs/malta_kvm_defconfig\nindex 85e95c0ae4107..3d1c32d3475e7 100644\n--- a/arch/mips/configs/malta_kvm_defconfig\n+++ b/arch/mips/configs/malta_kvm_defconfig\n@@ -340,7 +340,6 @@ CONFIG_AFFS_FS=m\n CONFIG_HFS_FS=m\n CONFIG_HFSPLUS_FS=m\n CONFIG_BEFS_FS=m\n-CONFIG_BFS_FS=m\n CONFIG_EFS_FS=m\n CONFIG_JFFS2_FS=m\n CONFIG_JFFS2_FS_XATTR=y\ndiff --git a/arch/mips/configs/maltaup_xpa_defconfig b/arch/mips/configs/maltaup_xpa_defconfig\nindex 0498a01153490..2545168b75bbc 100644\n--- a/arch/mips/configs/maltaup_xpa_defconfig\n+++ b/arch/mips/configs/maltaup_xpa_defconfig\n@@ -339,7 +339,6 @@ CONFIG_AFFS_FS=m\n CONFIG_HFS_FS=m\n CONFIG_HFSPLUS_FS=m\n CONFIG_BEFS_FS=m\n-CONFIG_BFS_FS=m\n CONFIG_EFS_FS=m\n CONFIG_JFFS2_FS=m\n CONFIG_JFFS2_FS_XATTR=y\ndiff --git a/arch/mips/configs/rm200_defconfig b/arch/mips/configs/rm200_defconfig\nindex 09e006c7cd7c6..cd2a831614c89 100644\n--- a/arch/mips/configs/rm200_defconfig\n+++ b/arch/mips/configs/rm200_defconfig\n@@ -318,7 +318,6 @@ CONFIG_ADFS_FS=m\n CONFIG_AFFS_FS=m\n CONFIG_HFS_FS=m\n CONFIG_BEFS_FS=m\n-CONFIG_BFS_FS=m\n CONFIG_EFS_FS=m\n CONFIG_CRAMFS=m\n CONFIG_VXFS_FS=m\ndiff --git a/arch/powerpc/configs/fsl-emb-nonhw.config b/arch/powerpc/configs/fsl-emb-nonhw.config\nindex 391c99117ee06..688051b11ce14 100644\n--- a/arch/powerpc/configs/fsl-emb-nonhw.config\n+++ b/arch/powerpc/configs/fsl-emb-nonhw.config\n@@ -2,7 +2,6 @@ CONFIG_ADFS_FS=m\n CONFIG_AFFS_FS=m\n CONFIG_AUDIT=y\n CONFIG_BEFS_FS=m\n-CONFIG_BFS_FS=m\n CONFIG_BINFMT_MISC=m\n # CONFIG_BLK_DEV_BSG is not set\n CONFIG_BLK_DEV_INITRD=y\ndiff --git a/arch/powerpc/configs/ppc6xx_defconfig b/arch/powerpc/configs/ppc6xx_defconfig\nindex acffc5c17f92d..8aab229fb9097 100644\n--- a/arch/powerpc/configs/ppc6xx_defconfig\n+++ b/arch/powerpc/configs/ppc6xx_defconfig\n@@ -945,7 +945,6 @@ CONFIG_ECRYPT_FS=m\n CONFIG_HFS_FS=m\n CONFIG_HFSPLUS_FS=m\n CONFIG_BEFS_FS=m\n-CONFIG_BFS_FS=m\n CONFIG_EFS_FS=m\n CONFIG_CRAMFS=m\n CONFIG_VXFS_FS=m\ndiff --git a/fs/Kconfig b/fs/Kconfig\nindex e05917adcd608..1cb0b3a8b12ca 100644\n--- a/fs/Kconfig\n+++ b/fs/Kconfig\n@@ -314,7 +314,6 @@ source \"fs/ecryptfs/Kconfig\"\n source \"fs/hfs/Kconfig\"\n source \"fs/hfsplus/Kconfig\"\n source \"fs/befs/Kconfig\"\n-source \"fs/bfs/Kconfig\"\n source \"fs/jffs2/Kconfig\"\n # UBIFS File system configuration\n source \"fs/ubifs/Kconfig\"\ndiff --git a/fs/Makefile b/fs/Makefile\nindex 055dfc23d82b6..16f1108b64e1a 100644\n--- a/fs/Makefile\n+++ b/fs/Makefile\n@@ -76,7 +76,6 @@ obj-$(CONFIG_CODA_FS)\t\t+= coda/\n obj-$(CONFIG_MINIX_FS)\t\t+= minix/\n obj-$(CONFIG_FAT_FS)\t\t+= fat/\n obj-$(CONFIG_EXFAT_FS)\t\t+= exfat/\n-obj-$(CONFIG_BFS_FS)\t\t+= bfs/\n obj-$(CONFIG_ISO9660_FS)\t+= isofs/\n obj-$(CONFIG_HFSPLUS_FS)\t+= hfsplus/ # Before hfs to find wrapped HFS+\n obj-$(CONFIG_HFS_FS)\t\t+= hfs/\ndiff --git a/fs/bfs/Kconfig b/fs/bfs/Kconfig\ndeleted file mode 100644\nindex 8e7ef866b62a6..0000000000000\n--- a/fs/bfs/Kconfig\n+++ /dev/null\n@@ -1,21 +0,0 @@\n-# SPDX-License-Identifier: GPL-2.0-only\n-config BFS_FS\n-\ttristate \"BFS file system support\"\n-\tdepends on BLOCK\n-\tselect BUFFER_HEAD\n-\thelp\n-\t  Boot File System (BFS) is a file system used under SCO UnixWare to\n-\t  allow the bootloader access to the kernel image and other important\n-\t  files during the boot process.  It is usually mounted under /stand\n-\t  and corresponds to the slice marked as \"STAND\" in the UnixWare\n-\t  partition.  You should say Y if you want to read or write the files\n-\t  on your /stand slice from within Linux.  You then also need to say Y\n-\t  to \"UnixWare slices support\", below.  More information about the BFS\n-\t  file system is contained in the file\n-\t  \u003cfile:Documentation/filesystems/bfs.rst\u003e.\n-\n-\t  If you don't know what this is about, say N.\n-\n-\t  To compile this as a module, choose M here: the module will be called\n-\t  bfs.  Note that the file system of your root partition (the one\n-\t  containing the directory /) cannot be compiled as a module.\ndiff --git a/fs/bfs/Makefile b/fs/bfs/Makefile\ndeleted file mode 100644\nindex 2b6bc5eb4de9c..0000000000000\n--- a/fs/bfs/Makefile\n+++ /dev/null\n@@ -1,8 +0,0 @@\n-# SPDX-License-Identifier: GPL-2.0-only\n-#\n-# Makefile for BFS filesystem.\n-#\n-\n-obj-$(CONFIG_BFS_FS) += bfs.o\n-\n-bfs-objs := inode.o file.o dir.o\ndiff --git a/fs/bfs/bfs.h b/fs/bfs/bfs.h\ndeleted file mode 100644\nindex b08afe733e632..0000000000000\n--- a/fs/bfs/bfs.h\n+++ /dev/null\n@@ -1,69 +0,0 @@\n-/* SPDX-License-Identifier: GPL-2.0 */\n-/*\n- *\tfs/bfs/bfs.h\n- *\tCopyright (C) 1999-2018 Tigran Aivazian \u003caivazian.tigran@gmail.com\u003e\n- */\n-#ifndef _FS_BFS_BFS_H\n-#define _FS_BFS_BFS_H\n-\n-#include \u003clinux/bfs_fs.h\u003e\n-\n-/* In theory BFS supports up to 512 inodes, numbered from 2 (for /) up to 513 inclusive.\n-   In actual fact, attempting to create the 512th inode (i.e. inode No. 513 or file No. 511)\n-   will fail with ENOSPC in bfs_add_entry(): the root directory cannot contain so many entries, counting '..'.\n-   So, mkfs.bfs(8) should really limit its -N option to 511 and not 512. For now, we just print a warning\n-   if a filesystem is mounted with such \"impossible to fill up\" number of inodes */\n-#define BFS_MAX_LASTI\t513\n-\n-/*\n- * BFS file system in-core superblock info\n- */\n-struct bfs_sb_info {\n-\tunsigned long si_blocks;\n-\tunsigned long si_freeb;\n-\tunsigned long si_freei;\n-\tunsigned long si_lf_eblk;\n-\tunsigned long si_lasti;\n-\tDECLARE_BITMAP(si_imap, BFS_MAX_LASTI+1);\n-\tstruct mutex bfs_lock;\n-};\n-\n-/*\n- * BFS file system in-core inode info\n- */\n-struct bfs_inode_info {\n-\tunsigned long i_dsk_ino; /* inode number from the disk, can be 0 */\n-\tunsigned long i_sblock;\n-\tunsigned long i_eblock;\n-\tstruct mapping_metadata_bhs i_metadata_bhs;\n-\tstruct inode vfs_inode;\n-};\n-\n-static inline struct bfs_sb_info *BFS_SB(struct super_block *sb)\n-{\n-\treturn sb-\u003es_fs_info;\n-}\n-\n-static inline struct bfs_inode_info *BFS_I(struct inode *inode)\n-{\n-\treturn container_of(inode, struct bfs_inode_info, vfs_inode);\n-}\n-\n-\n-#define printf(format, args...) \\\n-\tprintk(KERN_ERR \"BFS-fs: %s(): \" format, __func__, ## args)\n-\n-/* inode.c */\n-extern struct inode *bfs_iget(struct super_block *sb, unsigned long ino);\n-extern void bfs_dump_imap(const char *, struct super_block *);\n-\n-/* file.c */\n-extern const struct inode_operations bfs_file_inops;\n-extern const struct file_operations bfs_file_operations;\n-extern const struct address_space_operations bfs_aops;\n-\n-/* dir.c */\n-extern const struct inode_operations bfs_dir_inops;\n-extern const struct file_operations bfs_dir_operations;\n-\n-#endif /* _FS_BFS_BFS_H */\ndiff --git a/fs/bfs/dir.c b/fs/bfs/dir.c\ndeleted file mode 100644\nindex 91a4871fa0519..0000000000000\n--- a/fs/bfs/dir.c\n+++ /dev/null\n@@ -1,356 +0,0 @@\n-// SPDX-License-Identifier: GPL-2.0\n-/*\n- *\tfs/bfs/dir.c\n- *\tBFS directory operations.\n- *\tCopyright (C) 1999-2018  Tigran Aivazian \u003caivazian.tigran@gmail.com\u003e\n- *  Made endianness-clean by Andrew Stribblehill \u003cads@wompom.org\u003e 2005\n- */\n-\n-#include \u003clinux/time.h\u003e\n-#include \u003clinux/string.h\u003e\n-#include \u003clinux/fs.h\u003e\n-#include \u003clinux/buffer_head.h\u003e\n-#include \u003clinux/sched.h\u003e\n-#include \"bfs.h\"\n-\n-#undef DEBUG\n-\n-#ifdef DEBUG\n-#define dprintf(x...)\tprintf(x)\n-#else\n-#define dprintf(x...)\n-#endif\n-\n-static int bfs_add_entry(struct inode *dir, const struct qstr *child, int ino);\n-static struct buffer_head *bfs_find_entry(struct inode *dir,\n-\t\t\t\tconst struct qstr *child,\n-\t\t\t\tstruct bfs_dirent **res_dir);\n-\n-static int bfs_readdir(struct file *f, struct dir_context *ctx)\n-{\n-\tstruct inode *dir = file_inode(f);\n-\tstruct buffer_head *bh;\n-\tstruct bfs_dirent *de;\n-\tunsigned int offset;\n-\tint block;\n-\n-\tif (ctx-\u003epos \u0026 (BFS_DIRENT_SIZE - 1)) {\n-\t\tprintf(\"Bad f_pos=%08lx for %s:%08llx\\n\",\n-\t\t\t\t\t(unsigned long)ctx-\u003epos,\n-\t\t\t\t\tdir-\u003ei_sb-\u003es_id, dir-\u003ei_ino);\n-\t\treturn -EINVAL;\n-\t}\n-\n-\twhile (ctx-\u003epos \u003c dir-\u003ei_size) {\n-\t\toffset = ctx-\u003epos \u0026 (BFS_BSIZE - 1);\n-\t\tblock = BFS_I(dir)-\u003ei_sblock + (ctx-\u003epos \u003e\u003e BFS_BSIZE_BITS);\n-\t\tbh = sb_bread(dir-\u003ei_sb, block);\n-\t\tif (!bh) {\n-\t\t\tctx-\u003epos += BFS_BSIZE - offset;\n-\t\t\tcontinue;\n-\t\t}\n-\t\tdo {\n-\t\t\tde = (struct bfs_dirent *)(bh-\u003eb_data + offset);\n-\t\t\tif (de-\u003eino) {\n-\t\t\t\tint size = strnlen(de-\u003ename, BFS_NAMELEN);\n-\t\t\t\tif (!dir_emit(ctx, de-\u003ename, size,\n-\t\t\t\t\t\tle16_to_cpu(de-\u003eino),\n-\t\t\t\t\t\tDT_UNKNOWN)) {\n-\t\t\t\t\tbrelse(bh);\n-\t\t\t\t\treturn 0;\n-\t\t\t\t}\n-\t\t\t}\n-\t\t\toffset += BFS_DIRENT_SIZE;\n-\t\t\tctx-\u003epos += BFS_DIRENT_SIZE;\n-\t\t} while ((offset \u003c BFS_BSIZE) \u0026\u0026 (ctx-\u003epos \u003c dir-\u003ei_size));\n-\t\tbrelse(bh);\n-\t}\n-\treturn 0;\n-}\n-\n-const struct file_operations bfs_dir_operations = {\n-\t.read\t\t= generic_read_dir,\n-\t.iterate_shared\t= bfs_readdir,\n-\t.fsync\t\t= simple_fsync,\n-\t.llseek\t\t= generic_file_llseek,\n-};\n-\n-static int bfs_create(struct mnt_idmap *idmap, struct inode *dir,\n-\t\t      struct dentry *dentry, umode_t mode)\n-{\n-\tint err;\n-\tstruct inode *inode;\n-\tstruct super_block *s = dir-\u003ei_sb;\n-\tstruct bfs_sb_info *info = BFS_SB(s);\n-\tunsigned long ino;\n-\n-\tinode = new_inode(s);\n-\tif (!inode)\n-\t\treturn -ENOMEM;\n-\tmutex_lock(\u0026info-\u003ebfs_lock);\n-\tino = find_first_zero_bit(info-\u003esi_imap, info-\u003esi_lasti + 1);\n-\tif (ino \u003e info-\u003esi_lasti) {\n-\t\tmutex_unlock(\u0026info-\u003ebfs_lock);\n-\t\tiput(inode);\n-\t\treturn -ENOSPC;\n-\t}\n-\tset_bit(ino, info-\u003esi_imap);\n-\tinfo-\u003esi_freei--;\n-\tinode_init_owner(\u0026nop_mnt_idmap, inode, dir, mode);\n-\tsimple_inode_init_ts(inode);\n-\tinode-\u003ei_blocks = 0;\n-\tinode-\u003ei_op = \u0026bfs_file_inops;\n-\tinode-\u003ei_fop = \u0026bfs_file_operations;\n-\tinode-\u003ei_mapping-\u003ea_ops = \u0026bfs_aops;\n-\tinode-\u003ei_ino = ino;\n-\tBFS_I(inode)-\u003ei_dsk_ino = ino;\n-\tBFS_I(inode)-\u003ei_sblock = 0;\n-\tBFS_I(inode)-\u003ei_eblock = 0;\n-\tinsert_inode_hash(inode);\n-        mark_inode_dirty(inode);\n-\tbfs_dump_imap(\"create\", s);\n-\n-\terr = bfs_add_entry(dir, \u0026dentry-\u003ed_name, inode-\u003ei_ino);\n-\tif (err) {\n-\t\tinode_dec_link_count(inode);\n-\t\tmutex_unlock(\u0026info-\u003ebfs_lock);\n-\t\tiput(inode);\n-\t\treturn err;\n-\t}\n-\tmutex_unlock(\u0026info-\u003ebfs_lock);\n-\td_instantiate(dentry, inode);\n-\treturn 0;\n-}\n-\n-static struct dentry *bfs_lookup(struct inode *dir, struct dentry *dentry,\n-\t\t\t\t\t\tunsigned int flags)\n-{\n-\tstruct inode *inode = NULL;\n-\tstruct buffer_head *bh;\n-\tstruct bfs_dirent *de;\n-\tstruct bfs_sb_info *info = BFS_SB(dir-\u003ei_sb);\n-\n-\tif (dentry-\u003ed_name.len \u003e BFS_NAMELEN)\n-\t\treturn ERR_PTR(-ENAMETOOLONG);\n-\n-\tmutex_lock(\u0026info-\u003ebfs_lock);\n-\tbh = bfs_find_entry(dir, \u0026dentry-\u003ed_name, \u0026de);\n-\tif (bh) {\n-\t\tunsigned long ino = (unsigned long)le16_to_cpu(de-\u003eino);\n-\t\tbrelse(bh);\n-\t\tinode = bfs_iget(dir-\u003ei_sb, ino);\n-\t}\n-\tmutex_unlock(\u0026info-\u003ebfs_lock);\n-\treturn d_splice_alias(inode, dentry);\n-}\n-\n-static int bfs_link(struct dentry *old, struct inode *dir,\n-\t\t\t\t\t\tstruct dentry *new)\n-{\n-\tstruct inode *inode = d_inode(old);\n-\tstruct bfs_sb_info *info = BFS_SB(inode-\u003ei_sb);\n-\tint err;\n-\n-\tmutex_lock(\u0026info-\u003ebfs_lock);\n-\terr = bfs_add_entry(dir, \u0026new-\u003ed_name, inode-\u003ei_ino);\n-\tif (err) {\n-\t\tmutex_unlock(\u0026info-\u003ebfs_lock);\n-\t\treturn err;\n-\t}\n-\tinc_nlink(inode);\n-\tinode_set_ctime_current(inode);\n-\tmark_inode_dirty(inode);\n-\tihold(inode);\n-\td_instantiate(new, inode);\n-\tmutex_unlock(\u0026info-\u003ebfs_lock);\n-\treturn 0;\n-}\n-\n-static int bfs_unlink(struct inode *dir, struct dentry *dentry)\n-{\n-\tint error = -ENOENT;\n-\tstruct inode *inode = d_inode(dentry);\n-\tstruct buffer_head *bh;\n-\tstruct bfs_dirent *de;\n-\tstruct bfs_sb_info *info = BFS_SB(inode-\u003ei_sb);\n-\n-\tmutex_lock(\u0026info-\u003ebfs_lock);\n-\tbh = bfs_find_entry(dir, \u0026dentry-\u003ed_name, \u0026de);\n-\tif (!bh || (le16_to_cpu(de-\u003eino) != inode-\u003ei_ino))\n-\t\tgoto out_brelse;\n-\n-\tif (!inode-\u003ei_nlink) {\n-\t\tprintf(\"unlinking non-existent file %s:%llu (nlink=%d)\\n\",\n-\t\t\t\t\tinode-\u003ei_sb-\u003es_id, inode-\u003ei_ino,\n-\t\t\t\t\tinode-\u003ei_nlink);\n-\t\tset_nlink(inode, 1);\n-\t}\n-\tde-\u003eino = 0;\n-\tmmb_mark_buffer_dirty(bh, \u0026BFS_I(dir)-\u003ei_metadata_bhs);\n-\tinode_set_mtime_to_ts(dir, inode_set_ctime_current(dir));\n-\tmark_inode_dirty(dir);\n-\tinode_set_ctime_to_ts(inode, inode_get_ctime(dir));\n-\tinode_dec_link_count(inode);\n-\terror = 0;\n-\n-out_brelse:\n-\tbrelse(bh);\n-\tmutex_unlock(\u0026info-\u003ebfs_lock);\n-\treturn error;\n-}\n-\n-static int bfs_rename(struct mnt_idmap *idmap, struct inode *old_dir,\n-\t\t      struct dentry *old_dentry, struct inode *new_dir,\n-\t\t      struct dentry *new_dentry, unsigned int flags)\n-{\n-\tstruct inode *old_inode, *new_inode;\n-\tstruct buffer_head *old_bh, *new_bh;\n-\tstruct bfs_dirent *old_de, *new_de;\n-\tstruct bfs_sb_info *info;\n-\tint error = -ENOENT;\n-\n-\tif (flags \u0026 ~RENAME_NOREPLACE)\n-\t\treturn -EINVAL;\n-\n-\told_bh = new_bh = NULL;\n-\told_inode = d_inode(old_dentry);\n-\tif (S_ISDIR(old_inode-\u003ei_mode))\n-\t\treturn -EINVAL;\n-\n-\tinfo = BFS_SB(old_inode-\u003ei_sb);\n-\n-\tmutex_lock(\u0026info-\u003ebfs_lock);\n-\told_bh = bfs_find_entry(old_dir, \u0026old_dentry-\u003ed_name, \u0026old_de);\n-\n-\tif (!old_bh || (le16_to_cpu(old_de-\u003eino) != old_inode-\u003ei_ino))\n-\t\tgoto end_rename;\n-\n-\terror = -EPERM;\n-\tnew_inode = d_inode(new_dentry);\n-\tnew_bh = bfs_find_entry(new_dir, \u0026new_dentry-\u003ed_name, \u0026new_de);\n-\n-\tif (new_bh \u0026\u0026 !new_inode) {\n-\t\tbrelse(new_bh);\n-\t\tnew_bh = NULL;\n-\t}\n-\tif (!new_bh) {\n-\t\terror = bfs_add_entry(new_dir, \u0026new_dentry-\u003ed_name,\n-\t\t\t\t\told_inode-\u003ei_ino);\n-\t\tif (error)\n-\t\t\tgoto end_rename;\n-\t}\n-\told_de-\u003eino = 0;\n-\tinode_set_mtime_to_ts(old_dir, inode_set_ctime_current(old_dir));\n-\tmark_inode_dirty(old_dir);\n-\tif (new_inode) {\n-\t\tinode_set_ctime_current(new_inode);\n-\t\tinode_dec_link_count(new_inode);\n-\t}\n-\tmmb_mark_buffer_dirty(old_bh, \u0026BFS_I(old_dir)-\u003ei_metadata_bhs);\n-\terror = 0;\n-\n-end_rename:\n-\tmutex_unlock(\u0026info-\u003ebfs_lock);\n-\tbrelse(old_bh);\n-\tbrelse(new_bh);\n-\treturn error;\n-}\n-\n-const struct inode_operations bfs_dir_inops = {\n-\t.create\t\t\t= bfs_create,\n-\t.lookup\t\t\t= bfs_lookup,\n-\t.link\t\t\t= bfs_link,\n-\t.unlink\t\t\t= bfs_unlink,\n-\t.rename\t\t\t= bfs_rename,\n-};\n-\n-static int bfs_add_entry(struct inode *dir, const struct qstr *child, int ino)\n-{\n-\tconst unsigned char *name = child-\u003ename;\n-\tint namelen = child-\u003elen;\n-\tstruct buffer_head *bh;\n-\tstruct bfs_dirent *de;\n-\tint block, sblock, eblock, off, pos;\n-\tint i;\n-\n-\tdprintf(\"name=%s, namelen=%d\\n\", name, namelen);\n-\n-\tsblock = BFS_I(dir)-\u003ei_sblock;\n-\teblock = BFS_I(dir)-\u003ei_eblock;\n-\tfor (block = sblock; block \u003c= eblock; block++) {\n-\t\tbh = sb_bread(dir-\u003ei_sb, block);\n-\t\tif (!bh)\n-\t\t\treturn -EIO;\n-\t\tfor (off = 0; off \u003c BFS_BSIZE; off += BFS_DIRENT_SIZE) {\n-\t\t\tde = (struct bfs_dirent *)(bh-\u003eb_data + off);\n-\t\t\tif (!de-\u003eino) {\n-\t\t\t\tpos = (block - sblock) * BFS_BSIZE + off;\n-\t\t\t\tif (pos \u003e= dir-\u003ei_size) {\n-\t\t\t\t\tdir-\u003ei_size += BFS_DIRENT_SIZE;\n-\t\t\t\t\tinode_set_ctime_current(dir);\n-\t\t\t\t}\n-\t\t\t\tinode_set_mtime_to_ts(dir,\n-\t\t\t\t\t\t      inode_set_ctime_current(dir));\n-\t\t\t\tmark_inode_dirty(dir);\n-\t\t\t\tde-\u003eino = cpu_to_le16((u16)ino);\n-\t\t\t\tfor (i = 0; i \u003c BFS_NAMELEN; i++)\n-\t\t\t\t\tde-\u003ename[i] =\n-\t\t\t\t\t\t(i \u003c namelen) ? name[i] : 0;\n-\t\t\t\tmmb_mark_buffer_dirty(bh,\n-\t\t\t\t\t\t\u0026BFS_I(dir)-\u003ei_metadata_bhs);\n-\t\t\t\tbrelse(bh);\n-\t\t\t\treturn 0;\n-\t\t\t}\n-\t\t}\n-\t\tbrelse(bh);\n-\t}\n-\treturn -ENOSPC;\n-}\n-\n-static inline int bfs_namecmp(int len, const unsigned char *name,\n-\t\t\t\t\t\t\tconst char *buffer)\n-{\n-\tif ((len \u003c BFS_NAMELEN) \u0026\u0026 buffer[len])\n-\t\treturn 0;\n-\treturn !memcmp(name, buffer, len);\n-}\n-\n-static struct buffer_head *bfs_find_entry(struct inode *dir,\n-\t\t\tconst struct qstr *child,\n-\t\t\tstruct bfs_dirent **res_dir)\n-{\n-\tunsigned long block = 0, offset = 0;\n-\tstruct buffer_head *bh = NULL;\n-\tstruct bfs_dirent *de;\n-\tconst unsigned char *name = child-\u003ename;\n-\tint namelen = child-\u003elen;\n-\n-\t*res_dir = NULL;\n-\tif (namelen \u003e BFS_NAMELEN)\n-\t\treturn NULL;\n-\n-\twhile (block * BFS_BSIZE + offset \u003c dir-\u003ei_size) {\n-\t\tif (!bh) {\n-\t\t\tbh = sb_bread(dir-\u003ei_sb, BFS_I(dir)-\u003ei_sblock + block);\n-\t\t\tif (!bh) {\n-\t\t\t\tblock++;\n-\t\t\t\tcontinue;\n-\t\t\t}\n-\t\t}\n-\t\tde = (struct bfs_dirent *)(bh-\u003eb_data + offset);\n-\t\toffset += BFS_DIRENT_SIZE;\n-\t\tif (le16_to_cpu(de-\u003eino) \u0026\u0026\n-\t\t\t\tbfs_namecmp(namelen, name, de-\u003ename)) {\n-\t\t\t*res_dir = de;\n-\t\t\treturn bh;\n-\t\t}\n-\t\tif (offset \u003c bh-\u003eb_size)\n-\t\t\tcontinue;\n-\t\tbrelse(bh);\n-\t\tbh = NULL;\n-\t\toffset = 0;\n-\t\tblock++;\n-\t}\n-\tbrelse(bh);\n-\treturn NULL;\n-}\ndiff --git a/fs/bfs/file.c b/fs/bfs/file.c\ndeleted file mode 100644\nindex d33d6bde992b8..0000000000000\n--- a/fs/bfs/file.c\n+++ /dev/null\n@@ -1,203 +0,0 @@\n-// SPDX-License-Identifier: GPL-2.0\n-/*\n- *\tfs/bfs/file.c\n- *\tBFS file operations.\n- *\tCopyright (C) 1999-2018 Tigran Aivazian \u003caivazian.tigran@gmail.com\u003e\n- *\n- *\tMake the file block allocation algorithm understand the size\n- *\tof the underlying block device.\n- *\tCopyright (C) 2007 Dmitri Vorobiev \u003cdmitri.vorobiev@gmail.com\u003e\n- *\n- */\n-\n-#include \u003clinux/fs.h\u003e\n-#include \u003clinux/mpage.h\u003e\n-#include \u003clinux/buffer_head.h\u003e\n-#include \"bfs.h\"\n-\n-#undef DEBUG\n-\n-#ifdef DEBUG\n-#define dprintf(x...)\tprintf(x)\n-#else\n-#define dprintf(x...)\n-#endif\n-\n-const struct file_operations bfs_file_operations = {\n-\t.llseek \t= generic_file_llseek,\n-\t.read_iter\t= generic_file_read_iter,\n-\t.write_iter\t= generic_file_write_iter,\n-\t.mmap_prepare\t= generic_file_mmap_prepare,\n-\t.splice_read\t= filemap_splice_read,\n-};\n-\n-static int bfs_move_block(unsigned long from, unsigned long to,\n-\t\t\t\t\tstruct super_block *sb)\n-{\n-\tstruct buffer_head *bh, *new;\n-\n-\tbh = sb_bread(sb, from);\n-\tif (!bh)\n-\t\treturn -EIO;\n-\tnew = sb_getblk(sb, to);\n-\tmemcpy(new-\u003eb_data, bh-\u003eb_data, bh-\u003eb_size);\n-\tmark_buffer_dirty(new);\n-\tbforget(bh);\n-\tbrelse(new);\n-\treturn 0;\n-}\n-\n-static int bfs_move_blocks(struct super_block *sb, unsigned long start,\n-\t\t\t\tunsigned long end, unsigned long where)\n-{\n-\tunsigned long i;\n-\n-\tdprintf(\"%08lx-%08lx-\u003e%08lx\\n\", start, end, where);\n-\tfor (i = start; i \u003c= end; i++)\n-\t\tif(bfs_move_block(i, where + i, sb)) {\n-\t\t\tdprintf(\"failed to move block %08lx -\u003e %08lx\\n\", i,\n-\t\t\t\t\t\t\t\twhere + i);\n-\t\t\treturn -EIO;\n-\t\t}\n-\treturn 0;\n-}\n-\n-static int bfs_get_block(struct inode *inode, sector_t block,\n-\t\t\tstruct buffer_head *bh_result, int create)\n-{\n-\tunsigned long phys;\n-\tint err;\n-\tstruct super_block *sb = inode-\u003ei_sb;\n-\tstruct bfs_sb_info *info = BFS_SB(sb);\n-\tstruct bfs_inode_info *bi = BFS_I(inode);\n-\n-\tphys = bi-\u003ei_sblock + block;\n-\tif (!create) {\n-\t\tif (phys \u003c= bi-\u003ei_eblock) {\n-\t\t\tdprintf(\"c=%d, b=%08lx, phys=%09lx (granted)\\n\",\n-                                create, (unsigned long)block, phys);\n-\t\t\tmap_bh(bh_result, sb, phys);\n-\t\t}\n-\t\treturn 0;\n-\t}\n-\n-\t/*\n-\t * If the file is not empty and the requested block is within the\n-\t * range of blocks allocated for this file, we can grant it.\n-\t */\n-\tif (bi-\u003ei_sblock \u0026\u0026 (phys \u003c= bi-\u003ei_eblock)) {\n-\t\tdprintf(\"c=%d, b=%08lx, phys=%08lx (interim block granted)\\n\", \n-\t\t\t\tcreate, (unsigned long)block, phys);\n-\t\tmap_bh(bh_result, sb, phys);\n-\t\treturn 0;\n-\t}\n-\n-\t/* The file will be extended, so let's see if there is enough space. */\n-\tif (phys \u003e= info-\u003esi_blocks)\n-\t\treturn -ENOSPC;\n-\n-\t/* The rest has to be protected against itself. */\n-\tmutex_lock(\u0026info-\u003ebfs_lock);\n-\n-\t/*\n-\t * If the last data block for this file is the last allocated\n-\t * block, we can extend the file trivially, without moving it\n-\t * anywhere.\n-\t */\n-\tif (bi-\u003ei_eblock == info-\u003esi_lf_eblk) {\n-\t\tdprintf(\"c=%d, b=%08lx, phys=%08lx (simple extension)\\n\", \n-\t\t\t\tcreate, (unsigned long)block, phys);\n-\t\tmap_bh(bh_result, sb, phys);\n-\t\tinfo-\u003esi_freeb -= phys - bi-\u003ei_eblock;\n-\t\tinfo-\u003esi_lf_eblk = bi-\u003ei_eblock = phys;\n-\t\tmark_inode_dirty(inode);\n-\t\terr = 0;\n-\t\tgoto out;\n-\t}\n-\n-\t/* Ok, we have to move this entire file to the next free block. */\n-\tphys = info-\u003esi_lf_eblk + 1;\n-\tif (phys + block \u003e= info-\u003esi_blocks) {\n-\t\terr = -ENOSPC;\n-\t\tgoto out;\n-\t}\n-\n-\tif (bi-\u003ei_sblock) {\n-\t\terr = bfs_move_blocks(inode-\u003ei_sb, bi-\u003ei_sblock, \n-\t\t\t\t\t\tbi-\u003ei_eblock, phys);\n-\t\tif (err) {\n-\t\t\tdprintf(\"failed to move ino=%08lx -\u003e fs corruption\\n\",\n-\t\t\t\t\t\t\t\tinode-\u003ei_ino);\n-\t\t\tgoto out;\n-\t\t}\n-\t} else\n-\t\terr = 0;\n-\n-\tdprintf(\"c=%d, b=%08lx, phys=%08lx (moved)\\n\",\n-                create, (unsigned long)block, phys);\n-\tbi-\u003ei_sblock = phys;\n-\tphys += block;\n-\tinfo-\u003esi_lf_eblk = bi-\u003ei_eblock = phys;\n-\n-\t/*\n-\t * This assumes nothing can write the inode back while we are here\n-\t * and thus update inode-\u003ei_blocks! (XXX)\n-\t */\n-\tinfo-\u003esi_freeb -= bi-\u003ei_eblock - bi-\u003ei_sblock + 1 - inode-\u003ei_blocks;\n-\tmark_inode_dirty(inode);\n-\tmap_bh(bh_result, sb, phys);\n-out:\n-\tmutex_unlock(\u0026info-\u003ebfs_lock);\n-\treturn err;\n-}\n-\n-static int bfs_writepages(struct address_space *mapping,\n-\t\tstruct writeback_control *wbc)\n-{\n-\treturn mpage_writepages(mapping, wbc, bfs_get_block);\n-}\n-\n-static int bfs_read_folio(struct file *file, struct folio *folio)\n-{\n-\treturn block_read_full_folio(folio, bfs_get_block);\n-}\n-\n-static void bfs_write_failed(struct address_space *mapping, loff_t to)\n-{\n-\tstruct inode *inode = mapping-\u003ehost;\n-\n-\tif (to \u003e inode-\u003ei_size)\n-\t\ttruncate_pagecache(inode, inode-\u003ei_size);\n-}\n-\n-static int bfs_write_begin(const struct kiocb *iocb,\n-\t\t\t   struct address_space *mapping,\n-\t\t\t   loff_t pos, unsigned len,\n-\t\t\t   struct folio **foliop, void **fsdata)\n-{\n-\tint ret;\n-\n-\tret = block_write_begin(mapping, pos, len, foliop, bfs_get_block);\n-\tif (unlikely(ret))\n-\t\tbfs_write_failed(mapping, pos + len);\n-\n-\treturn ret;\n-}\n-\n-static sector_t bfs_bmap(struct address_space *mapping, sector_t block)\n-{\n-\treturn generic_block_bmap(mapping, block, bfs_get_block);\n-}\n-\n-const struct address_space_operations bfs_aops = {\n-\t.dirty_folio\t= block_dirty_folio,\n-\t.invalidate_folio = block_invalidate_folio,\n-\t.read_folio\t= bfs_read_folio,\n-\t.writepages\t= bfs_writepages,\n-\t.write_begin\t= bfs_write_begin,\n-\t.write_end\t= generic_write_end,\n-\t.migrate_folio\t= buffer_migrate_folio,\n-\t.bmap\t\t= bfs_bmap,\n-};\n-\n-const struct inode_operations bfs_file_inops;\ndiff --git a/fs/bfs/inode.c b/fs/bfs/inode.c\ndeleted file mode 100644\nindex 06e3a848b4efd..0000000000000\n--- a/fs/bfs/inode.c\n+++ /dev/null\n@@ -1,538 +0,0 @@\n-// SPDX-License-Identifier: GPL-2.0-only\n-/*\n- *\tfs/bfs/inode.c\n- *\tBFS superblock and inode operations.\n- *\tCopyright (C) 1999-2018 Tigran Aivazian \u003caivazian.tigran@gmail.com\u003e\n- *\tFrom fs/minix, Copyright (C) 1991, 1992 Linus Torvalds.\n- *\tMade endianness-clean by Andrew Stribblehill \u003cads@wompom.org\u003e, 2005.\n- */\n-\n-#include \u003clinux/module.h\u003e\n-#include \u003clinux/mm.h\u003e\n-#include \u003clinux/slab.h\u003e\n-#include \u003clinux/init.h\u003e\n-#include \u003clinux/fs.h\u003e\n-#include \u003clinux/buffer_head.h\u003e\n-#include \u003clinux/vfs.h\u003e\n-#include \u003clinux/writeback.h\u003e\n-#include \u003clinux/uio.h\u003e\n-#include \u003clinux/uaccess.h\u003e\n-#include \u003clinux/fs_context.h\u003e\n-#include \"bfs.h\"\n-\n-MODULE_AUTHOR(\"Tigran Aivazian \u003caivazian.tigran@gmail.com\u003e\");\n-MODULE_DESCRIPTION(\"SCO UnixWare BFS filesystem for Linux\");\n-MODULE_LICENSE(\"GPL\");\n-\n-#undef DEBUG\n-\n-#ifdef DEBUG\n-#define dprintf(x...)\tprintf(x)\n-#else\n-#define dprintf(x...)\n-#endif\n-\n-struct inode *bfs_iget(struct super_block *sb, unsigned long ino)\n-{\n-\tstruct bfs_inode *di;\n-\tstruct inode *inode;\n-\tstruct buffer_head *bh;\n-\tint block, off;\n-\n-\tinode = iget_locked(sb, ino);\n-\tif (!inode)\n-\t\treturn ERR_PTR(-ENOMEM);\n-\tif (!(inode_state_read_once(inode) \u0026 I_NEW))\n-\t\treturn inode;\n-\n-\tif ((ino \u003c BFS_ROOT_INO) || (ino \u003e BFS_SB(inode-\u003ei_sb)-\u003esi_lasti)) {\n-\t\tprintf(\"Bad inode number %s:%08lx\\n\", inode-\u003ei_sb-\u003es_id, ino);\n-\t\tgoto error;\n-\t}\n-\n-\tblock = (ino - BFS_ROOT_INO) / BFS_INODES_PER_BLOCK + 1;\n-\tbh = sb_bread(inode-\u003ei_sb, block);\n-\tif (!bh) {\n-\t\tprintf(\"Unable to read inode %s:%08lx\\n\", inode-\u003ei_sb-\u003es_id,\n-\t\t\t\t\t\t\t\t\tino);\n-\t\tgoto error;\n-\t}\n-\n-\toff = (ino - BFS_ROOT_INO) % BFS_INODES_PER_BLOCK;\n-\tdi = (struct bfs_inode *)bh-\u003eb_data + off;\n-\n-\t/*\n-\t * https://martin.hinner.info/fs/bfs/bfs-structure.html explains that\n-\t * BFS in SCO UnixWare environment used only lower 9 bits of di-\u003ei_mode\n-\t * value. This means that, although bfs_write_inode() saves whole\n-\t * inode-\u003ei_mode bits (which include S_IFMT bits and S_IS{UID,GID,VTX}\n-\t * bits), middle 7 bits of di-\u003ei_mode value can be garbage when these\n-\t * bits were not saved by bfs_write_inode().\n-\t * Since we can't tell whether middle 7 bits are garbage, use only\n-\t * lower 12 bits (i.e. tolerate S_IS{UID,GID,VTX} bits possibly being\n-\t * garbage) and reconstruct S_IFMT bits for Linux environment from\n-\t * di-\u003ei_vtype value.\n-\t */\n-\tinode-\u003ei_mode = 0x00000FFF \u0026 le32_to_cpu(di-\u003ei_mode);\n-\tif (le32_to_cpu(di-\u003ei_vtype) == BFS_VDIR) {\n-\t\tinode-\u003ei_mode |= S_IFDIR;\n-\t\tinode-\u003ei_op = \u0026bfs_dir_inops;\n-\t\tinode-\u003ei_fop = \u0026bfs_dir_operations;\n-\t} else if (le32_to_cpu(di-\u003ei_vtype) == BFS_VREG) {\n-\t\tinode-\u003ei_mode |= S_IFREG;\n-\t\tinode-\u003ei_op = \u0026bfs_file_inops;\n-\t\tinode-\u003ei_fop = \u0026bfs_file_operations;\n-\t\tinode-\u003ei_mapping-\u003ea_ops = \u0026bfs_aops;\n-\t} else {\n-\t\tbrelse(bh);\n-\t\tprintf(\"Unknown vtype=%u %s:%08lx\\n\",\n-\t\t       le32_to_cpu(di-\u003ei_vtype), inode-\u003ei_sb-\u003es_id, ino);\n-\t\tgoto error;\n-\t}\n-\n-\tBFS_I(inode)-\u003ei_sblock =  le32_to_cpu(di-\u003ei_sblock);\n-\tBFS_I(inode)-\u003ei_eblock =  le32_to_cpu(di-\u003ei_eblock);\n-\tBFS_I(inode)-\u003ei_dsk_ino = le16_to_cpu(di-\u003ei_ino);\n-\ti_uid_write(inode, le32_to_cpu(di-\u003ei_uid));\n-\ti_gid_write(inode,  le32_to_cpu(di-\u003ei_gid));\n-\tset_nlink(inode, le32_to_cpu(di-\u003ei_nlink));\n-\tinode-\u003ei_size = BFS_FILESIZE(di);\n-\tinode-\u003ei_blocks = BFS_FILEBLOCKS(di);\n-\tinode_set_atime(inode, le32_to_cpu(di-\u003ei_atime), 0);\n-\tinode_set_mtime(inode, le32_to_cpu(di-\u003ei_mtime), 0);\n-\tinode_set_ctime(inode, le32_to_cpu(di-\u003ei_ctime), 0);\n-\n-\tbrelse(bh);\n-\tunlock_new_inode(inode);\n-\treturn inode;\n-\n-error:\n-\tiget_failed(inode);\n-\treturn ERR_PTR(-EIO);\n-}\n-\n-static struct bfs_inode *find_inode(struct super_block *sb, u16 ino, struct buffer_head **p)\n-{\n-\tif ((ino \u003c BFS_ROOT_INO) || (ino \u003e BFS_SB(sb)-\u003esi_lasti)) {\n-\t\tprintf(\"Bad inode number %s:%08x\\n\", sb-\u003es_id, ino);\n-\t\treturn ERR_PTR(-EIO);\n-\t}\n-\n-\tino -= BFS_ROOT_INO;\n-\n-\t*p = sb_bread(sb, 1 + ino / BFS_INODES_PER_BLOCK);\n-\tif (!*p) {\n-\t\tprintf(\"Unable to read inode %s:%08x\\n\", sb-\u003es_id, ino);\n-\t\treturn ERR_PTR(-EIO);\n-\t}\n-\n-\treturn (struct bfs_inode *)(*p)-\u003eb_data +  ino % BFS_INODES_PER_BLOCK;\n-}\n-\n-static int bfs_write_inode(struct inode *inode, struct writeback_control *wbc)\n-{\n-\tstruct bfs_sb_info *info = BFS_SB(inode-\u003ei_sb);\n-\tunsigned int ino = (u16)inode-\u003ei_ino;\n-\tunsigned long i_sblock;\n-\tstruct bfs_inode *di;\n-\tstruct buffer_head *bh;\n-\n-\tdprintf(\"ino=%08x\\n\", ino);\n-\n-\tdi = find_inode(inode-\u003ei_sb, ino, \u0026bh);\n-\tif (IS_ERR(di))\n-\t\treturn PTR_ERR(di);\n-\n-\tmutex_lock(\u0026info-\u003ebfs_lock);\n-\n-\tif (ino == BFS_ROOT_INO)\n-\t\tdi-\u003ei_vtype = cpu_to_le32(BFS_VDIR);\n-\telse\n-\t\tdi-\u003ei_vtype = cpu_to_le32(BFS_VREG);\n-\n-\tdi-\u003ei_ino = cpu_to_le16(ino);\n-\tdi-\u003ei_mode = cpu_to_le32(inode-\u003ei_mode);\n-\tdi-\u003ei_uid = cpu_to_le32(i_uid_read(inode));\n-\tdi-\u003ei_gid = cpu_to_le32(i_gid_read(inode));\n-\tdi-\u003ei_nlink = cpu_to_le32(inode-\u003ei_nlink);\n-\tdi-\u003ei_atime = cpu_to_le32(inode_get_atime_sec(inode));\n-\tdi-\u003ei_mtime = cpu_to_le32(inode_get_mtime_sec(inode));\n-\tdi-\u003ei_ctime = cpu_to_le32(inode_get_ctime_sec(inode));\n-\ti_sblock = BFS_I(inode)-\u003ei_sblock;\n-\tdi-\u003ei_sblock = cpu_to_le32(i_sblock);\n-\tdi-\u003ei_eblock = cpu_to_le32(BFS_I(inode)-\u003ei_eblock);\n-\tdi-\u003ei_eoffset = cpu_to_le32(i_sblock * BFS_BSIZE + inode-\u003ei_size - 1);\n-\n-\tmark_buffer_dirty(bh);\n-\tbrelse(bh);\n-\tmutex_unlock(\u0026info-\u003ebfs_lock);\n-\tset_inode_metadata_writeback(inode);\n-\treturn 0;\n-}\n-\n-static int bfs_sync_inode_metadata(struct inode *inode,\n-\t\t\t\t   struct writeback_control *wbc)\n-{\n-\tint err = 0;\n-\tstruct bfs_inode *di;\n-\tstruct buffer_head *bh;\n-\n-\tdi = find_inode(inode-\u003ei_sb, (u16)inode-\u003ei_ino, \u0026bh);\n-\tif (IS_ERR(di))\n-\t\treturn PTR_ERR(di);\n-\n-\tsync_dirty_buffer(bh);\n-\tif (buffer_write_io_error(bh)) {\n-\t\terr = -EIO;\n-\t\tgoto out;\n-\t}\n-\terr = mmb_sync(\u0026BFS_I(inode)-\u003ei_metadata_bhs);\n-out:\n-\tbrelse(bh);\n-\treturn err;\n-}\n-\n-static void bfs_evict_inode(struct inode *inode)\n-{\n-\tunsigned long ino = inode-\u003ei_ino;\n-\tstruct bfs_inode *di;\n-\tstruct buffer_head *bh;\n-\tstruct super_block *s = inode-\u003ei_sb;\n-\tstruct bfs_sb_info *info = BFS_SB(s);\n-\tstruct bfs_inode_info *bi = BFS_I(inode);\n-\n-\tdprintf(\"ino=%08lx\\n\", ino);\n-\n-\ttruncate_inode_pages_final(\u0026inode-\u003ei_data);\n-\tif (inode-\u003ei_nlink)\n-\t\tmmb_sync(\u0026BFS_I(inode)-\u003ei_metadata_bhs);\n-\tmmb_invalidate(\u0026BFS_I(inode)-\u003ei_metadata_bhs);\n-\tclear_inode(inode);\n-\n-\tif (inode-\u003ei_nlink)\n-\t\treturn;\n-\n-\tdi = find_inode(s, inode-\u003ei_ino, \u0026bh);\n-\tif (IS_ERR(di))\n-\t\treturn;\n-\n-\tmutex_lock(\u0026info-\u003ebfs_lock);\n-\t/* clear on-disk inode */\n-\tmemset(di, 0, sizeof(struct bfs_inode));\n-\tmark_buffer_dirty(bh);\n-\tbrelse(bh);\n-\n-\tif (bi-\u003ei_dsk_ino) {\n-\t\tif (bi-\u003ei_sblock)\n-\t\t\tinfo-\u003esi_freeb += bi-\u003ei_eblock + 1 - bi-\u003ei_sblock;\n-\t\tinfo-\u003esi_freei++;\n-\t\tclear_bit(ino, info-\u003esi_imap);\n-\t\tbfs_dump_imap(\"evict_inode\", s);\n-\t}\n-\n-\t/*\n-\t * If this was the last file, make the previous block\n-\t * \"last block of the last file\" even if there is no\n-\t * real file there, saves us 1 gap.\n-\t */\n-\tif (info-\u003esi_lf_eblk == bi-\u003ei_eblock)\n-\t\tinfo-\u003esi_lf_eblk = bi-\u003ei_sblock - 1;\n-\tmutex_unlock(\u0026info-\u003ebfs_lock);\n-}\n-\n-static void bfs_put_super(struct super_block *s)\n-{\n-\tstruct bfs_sb_info *info = BFS_SB(s);\n-\n-\tif (!info)\n-\t\treturn;\n-\n-\tmutex_destroy(\u0026info-\u003ebfs_lock);\n-\tkfree(info);\n-\ts-\u003es_fs_info = NULL;\n-}\n-\n-static int bfs_statfs(struct dentry *dentry, struct kstatfs *buf)\n-{\n-\tstruct super_block *s = dentry-\u003ed_sb;\n-\tstruct bfs_sb_info *info = BFS_SB(s);\n-\tu64 id = huge_encode_dev(s-\u003es_bdev-\u003ebd_dev);\n-\tbuf-\u003ef_type = BFS_MAGIC;\n-\tbuf-\u003ef_bsize = s-\u003es_blocksize;\n-\tbuf-\u003ef_blocks = info-\u003esi_blocks;\n-\tbuf-\u003ef_bfree = buf-\u003ef_bavail = info-\u003esi_freeb;\n-\tbuf-\u003ef_files = info-\u003esi_lasti + 1 - BFS_ROOT_INO;\n-\tbuf-\u003ef_ffree = info-\u003esi_freei;\n-\tbuf-\u003ef_fsid = u64_to_fsid(id);\n-\tbuf-\u003ef_namelen = BFS_NAMELEN;\n-\treturn 0;\n-}\n-\n-static struct kmem_cache *bfs_inode_cachep;\n-\n-static struct inode *bfs_alloc_inode(struct super_block *sb)\n-{\n-\tstruct bfs_inode_info *bi;\n-\tbi = alloc_inode_sb(sb, bfs_inode_cachep, GFP_KERNEL);\n-\tif (!bi)\n-\t\treturn NULL;\n-\tmmb_init(\u0026bi-\u003ei_metadata_bhs, \u0026bi-\u003evfs_inode.i_data);\n-\n-\treturn \u0026bi-\u003evfs_inode;\n-}\n-\n-static void bfs_free_inode(struct inode *inode)\n-{\n-\tkmem_cache_free(bfs_inode_cachep, BFS_I(inode));\n-}\n-\n-static void init_once(void *foo)\n-{\n-\tstruct bfs_inode_info *bi = foo;\n-\n-\tinode_init_once(\u0026bi-\u003evfs_inode);\n-}\n-\n-static int __init init_inodecache(void)\n-{\n-\tbfs_inode_cachep = kmem_cache_create(\"bfs_inode_cache\",\n-\t\t\t\t\t     sizeof(struct bfs_inode_info),\n-\t\t\t\t\t     0, (SLAB_RECLAIM_ACCOUNT|\n-\t\t\t\t\t\tSLAB_ACCOUNT),\n-\t\t\t\t\t     init_once);\n-\tif (bfs_inode_cachep == NULL)\n-\t\treturn -ENOMEM;\n-\treturn 0;\n-}\n-\n-static void destroy_inodecache(void)\n-{\n-\t/*\n-\t * Make sure all delayed rcu free inodes are flushed before we\n-\t * destroy cache.\n-\t */\n-\trcu_barrier();\n-\tkmem_cache_destroy(bfs_inode_cachep);\n-}\n-\n-static const struct super_operations bfs_sops = {\n-\t.alloc_inode\t= bfs_alloc_inode,\n-\t.free_inode\t= bfs_free_inode,\n-\t.write_inode\t= bfs_write_inode,\n-\t.sync_inode_metadata = bfs_sync_inode_metadata,\n-\t.evict_inode\t= bfs_evict_inode,\n-\t.put_super\t= bfs_put_super,\n-\t.statfs\t\t= bfs_statfs,\n-};\n-\n-void bfs_dump_imap(const char *prefix, struct super_block *s)\n-{\n-#ifdef DEBUG\n-\tint i;\n-\tchar *tmpbuf = kzalloc(PAGE_SIZE, GFP_KERNEL);\n-\n-\tif (!tmpbuf)\n-\t\treturn;\n-\tfor (i = BFS_SB(s)-\u003esi_lasti; i \u003e= 0; i--) {\n-\t\tif (i \u003e PAGE_SIZE - 100) break;\n-\t\tif (test_bit(i, BFS_SB(s)-\u003esi_imap))\n-\t\t\tstrcat(tmpbuf, \"1\");\n-\t\telse\n-\t\t\tstrcat(tmpbuf, \"0\");\n-\t}\n-\tprintf(\"%s: lasti=%08lx \u003c%s\u003e\\n\", prefix, BFS_SB(s)-\u003esi_lasti, tmpbuf);\n-\tkfree(tmpbuf);\n-#endif\n-}\n-\n-static int bfs_fill_super(struct super_block *s, struct fs_context *fc)\n-{\n-\tstruct buffer_head *bh, *sbh;\n-\tstruct bfs_super_block *bfs_sb;\n-\tstruct inode *inode;\n-\tunsigned i;\n-\tstruct bfs_sb_info *info;\n-\tint ret = -EINVAL;\n-\tunsigned long i_sblock, i_eblock, i_eoff, s_size;\n-\tint silent = fc-\u003esb_flags \u0026 SB_SILENT;\n-\n-\tinfo = kzalloc_obj(*info);\n-\tif (!info)\n-\t\treturn -ENOMEM;\n-\tmutex_init(\u0026info-\u003ebfs_lock);\n-\ts-\u003es_fs_info = info;\n-\ts-\u003es_time_min = 0;\n-\ts-\u003es_time_max = U32_MAX;\n-\n-\tif (!sb_set_blocksize(s, BFS_BSIZE))\n-\t\tgoto out;\n-\n-\tsbh = sb_bread(s, 0);\n-\tif (!sbh)\n-\t\tgoto out;\n-\tbfs_sb = (struct bfs_super_block *)sbh-\u003eb_data;\n-\tif (le32_to_cpu(bfs_sb-\u003es_magic) != BFS_MAGIC) {\n-\t\tif (!silent)\n-\t\t\tprintf(\"No BFS filesystem on %s (magic=%08x)\\n\", s-\u003es_id,  le32_to_cpu(bfs_sb-\u003es_magic));\n-\t\tgoto out1;\n-\t}\n-\tif (BFS_UNCLEAN(bfs_sb, s) \u0026\u0026 !silent)\n-\t\tprintf(\"%s is unclean, continuing\\n\", s-\u003es_id);\n-\n-\ts-\u003es_magic = BFS_MAGIC;\n-\n-\tif (le32_to_cpu(bfs_sb-\u003es_start) \u003e le32_to_cpu(bfs_sb-\u003es_end) ||\n-\t    le32_to_cpu(bfs_sb-\u003es_start) \u003c sizeof(struct bfs_super_block) + sizeof(struct bfs_dirent)) {\n-\t\tprintf(\"Superblock is corrupted on %s\\n\", s-\u003es_id);\n-\t\tgoto out1;\n-\t}\n-\n-\tinfo-\u003esi_lasti = (le32_to_cpu(bfs_sb-\u003es_start) - BFS_BSIZE) / sizeof(struct bfs_inode) + BFS_ROOT_INO - 1;\n-\tif (info-\u003esi_lasti == BFS_MAX_LASTI)\n-\t\tprintf(\"NOTE: filesystem %s was created with 512 inodes, the real maximum is 511, mounting anyway\\n\", s-\u003es_id);\n-\telse if (info-\u003esi_lasti \u003e BFS_MAX_LASTI) {\n-\t\tprintf(\"Impossible last inode number %lu \u003e %d on %s\\n\", info-\u003esi_lasti, BFS_MAX_LASTI, s-\u003es_id);\n-\t\tgoto out1;\n-\t}\n-\tfor (i = 0; i \u003c BFS_ROOT_INO; i++)\n-\t\tset_bit(i, info-\u003esi_imap);\n-\n-\ts-\u003es_op = \u0026bfs_sops;\n-\tinode = bfs_iget(s, BFS_ROOT_INO);\n-\tif (IS_ERR(inode)) {\n-\t\tret = PTR_ERR(inode);\n-\t\tgoto out1;\n-\t}\n-\ts-\u003es_root = d_make_root(inode);\n-\tif (!s-\u003es_root) {\n-\t\tret = -ENOMEM;\n-\t\tgoto out1;\n-\t}\n-\n-\tinfo-\u003esi_blocks = (le32_to_cpu(bfs_sb-\u003es_end) + 1) \u003e\u003e BFS_BSIZE_BITS;\n-\tinfo-\u003esi_freeb = (le32_to_cpu(bfs_sb-\u003es_end) + 1 - le32_to_cpu(bfs_sb-\u003es_start)) \u003e\u003e BFS_BSIZE_BITS;\n-\tinfo-\u003esi_freei = 0;\n-\tinfo-\u003esi_lf_eblk = 0;\n-\n-\t/* can we read the last block? */\n-\tbh = sb_bread(s, info-\u003esi_blocks - 1);\n-\tif (!bh) {\n-\t\tprintf(\"Last block not available on %s: %lu\\n\", s-\u003es_id, info-\u003esi_blocks - 1);\n-\t\tret = -EIO;\n-\t\tgoto out2;\n-\t}\n-\tbrelse(bh);\n-\n-\tbh = NULL;\n-\tfor (i = BFS_ROOT_INO; i \u003c= info-\u003esi_lasti; i++) {\n-\t\tstruct bfs_inode *di;\n-\t\tint block = (i - BFS_ROOT_INO) / BFS_INODES_PER_BLOCK + 1;\n-\t\tint off = (i - BFS_ROOT_INO) % BFS_INODES_PER_BLOCK;\n-\t\tunsigned long eblock;\n-\n-\t\tif (!off) {\n-\t\t\tbrelse(bh);\n-\t\t\tbh = sb_bread(s, block);\n-\t\t}\n-\n-\t\tif (!bh)\n-\t\t\tcontinue;\n-\n-\t\tdi = (struct bfs_inode *)bh-\u003eb_data + off;\n-\n-\t\t/* test if filesystem is not corrupted */\n-\n-\t\ti_eoff = le32_to_cpu(di-\u003ei_eoffset);\n-\t\ti_sblock = le32_to_cpu(di-\u003ei_sblock);\n-\t\ti_eblock = le32_to_cpu(di-\u003ei_eblock);\n-\t\ts_size = le32_to_cpu(bfs_sb-\u003es_end);\n-\n-\t\tif (i_sblock \u003e info-\u003esi_blocks ||\n-\t\t\ti_eblock \u003e info-\u003esi_blocks ||\n-\t\t\ti_sblock \u003e i_eblock ||\n-\t\t\t(i_eoff != le32_to_cpu(-1) \u0026\u0026 i_eoff \u003e s_size) ||\n-\t\t\ti_sblock * BFS_BSIZE \u003e i_eoff) {\n-\n-\t\t\tprintf(\"Inode 0x%08x corrupted on %s\\n\", i, s-\u003es_id);\n-\n-\t\t\tbrelse(bh);\n-\t\t\tret = -EIO;\n-\t\t\tgoto out2;\n-\t\t}\n-\n-\t\tif (!di-\u003ei_ino) {\n-\t\t\tinfo-\u003esi_freei++;\n-\t\t\tcontinue;\n-\t\t}\n-\t\tset_bit(i, info-\u003esi_imap);\n-\t\tinfo-\u003esi_freeb -= BFS_FILEBLOCKS(di);\n-\n-\t\teblock =  le32_to_cpu(di-\u003ei_eblock);\n-\t\tif (eblock \u003e info-\u003esi_lf_eblk)\n-\t\t\tinfo-\u003esi_lf_eblk = eblock;\n-\t}\n-\tbrelse(bh);\n-\tbrelse(sbh);\n-\tbfs_dump_imap(\"fill_super\", s);\n-\treturn 0;\n-\n-out2:\n-\tdput(s-\u003es_root);\n-\ts-\u003es_root = NULL;\n-out1:\n-\tbrelse(sbh);\n-out:\n-\tmutex_destroy(\u0026info-\u003ebfs_lock);\n-\tkfree(info);\n-\ts-\u003es_fs_info = NULL;\n-\treturn ret;\n-}\n-\n-static int bfs_get_tree(struct fs_context *fc)\n-{\n-\treturn get_tree_bdev(fc, bfs_fill_super);\n-}\n-\n-static const struct fs_context_operations bfs_context_ops = {\n-\t.get_tree = bfs_get_tree,\n-};\n-\n-static int bfs_init_fs_context(struct fs_context *fc)\n-{\n-\tfc-\u003eops = \u0026bfs_context_ops;\n-\n-\treturn 0;\n-}\n-\n-static struct file_system_type bfs_fs_type = {\n-\t.owner\t\t\t= THIS_MODULE,\n-\t.name\t\t\t= \"bfs\",\n-\t.init_fs_context\t= bfs_init_fs_context,\n-\t.kill_sb\t\t= kill_block_super,\n-\t.fs_flags\t\t= FS_REQUIRES_DEV,\n-};\n-MODULE_ALIAS_FS(\"bfs\");\n-\n-static int __init init_bfs_fs(void)\n-{\n-\tint err = init_inodecache();\n-\tif (err)\n-\t\tgoto out1;\n-\terr = register_filesystem(\u0026bfs_fs_type);\n-\tif (err)\n-\t\tgoto out;\n-\treturn 0;\n-out:\n-\tdestroy_inodecache();\n-out1:\n-\treturn err;\n-}\n-\n-static void __exit exit_bfs_fs(void)\n-{\n-\tunregister_filesystem(\u0026bfs_fs_type);\n-\tdestroy_inodecache();\n-}\n-\n-module_init(init_bfs_fs)\n-module_exit(exit_bfs_fs)\ndiff --git a/tools/testing/selftests/filesystems/statmount/statmount_test.c b/tools/testing/selftests/filesystems/statmount/statmount_test.c\nindex 60c2c544db6a4..52544512edc75 100644\n--- a/tools/testing/selftests/filesystems/statmount/statmount_test.c\n+++ b/tools/testing/selftests/filesystems/statmount/statmount_test.c\n@@ -17,7 +17,7 @@\n \n static const char *const known_fs[] = {\n \t\"9p\", \"adfs\", \"affs\", \"afs\", \"aio\", \"anon_inodefs\", \"apparmorfs\",\n-\t\"autofs\", \"bcachefs\", \"bdev\", \"befs\", \"bfs\", \"binder\", \"binfmt_misc\",\n+\t\"autofs\", \"bcachefs\", \"bdev\", \"befs\", \"binder\", \"binfmt_misc\",\n \t\"bpf\", \"btrfs\", \"btrfs_test_fs\", \"ceph\", \"cgroup\", \"cgroup2\", \"cifs\",\n \t\"coda\", \"configfs\", \"cpuset\", \"cramfs\", \"cxl\", \"dax\", \"debugfs\",\n \t\"devpts\", \"devtmpfs\", \"dmabuf\", \"drm\", \"ecryptfs\", \"efivarfs\", \"efs\",\n"
}

2/1 2026/09/05 17:41 agent patch-evaluator
0m Model:
core

Args:
null

Results:
{
  "EnableConfigs": null,
  "FocusSymbols": [],
  "Reasoning": "The patch completely removes the legacy BFS (Boot File System) filesystem implementation from the kernel, along with its documentation, Kconfig entries, defconfigs, and selftest references. As only code removal, documentation, and config/selftest cleanup are performed, there is no new or modified executable code to fuzz.",
  "WorthFuzzing": false
}

Instruction:
You are an expert Linux kernel maintainer and security engineer.
Your job is to review a provided patch series and evaluate whether it warrants fuzzing with syzkaller.

IMPORTANT: The changes have ALREADY been applied and committed as the HEAD commit in
your workspace. Do NOT rely on internal assumptions. You must actively use your code access
tools to inspect the actual source code, callers, and surrounding context.

================================================================================
1. CORE TRIAGE PHILOSOPHY
================================================================================
The goal of patch fuzzing is to discover crashes, regressions, exposed latent bugs,
and newly triggered assertions introduced by the patch series.

- REACHABILITY IS THE PRIMARY GATE:
  Fuzzing can only discover bugs in code that can actually execute in standard virtualized
  environments (GCE or QEMU, utilizing software-emulated devices like USB gadgets, netdev, tun/tap).
  If the modified code is structurally unreachable (see Section 2), it MUST NOT be fuzzed,
  regardless of whether it adds assertions or complex logic.

- DO NOT BLINDLY TRUST "NO FUNCTIONAL CHANGE" (NFCI) OR "REFACTORING" CLAIMS:
  Patch authors routinely label changes as "cleanups", "refactorings", or state
  "No functional change intended". Do NOT take these claims at face value.
  Code refactorings that rearrange logic, introduce helper functions, or alter state management
  in core subsystems frequently introduce subtle semantic shifts or uncover latent kernel bugs.
  If reachable executable code is modified or refactored, it MUST be fuzzed.

- NEW OR MODIFIED ASSERTIONS IN REACHABLE CODE MUST BE FUZZED:
  When a patch introduces or modifies runtime checks or assertions (e.g., WARN_ON*, VM_WARN_ON*,
  BUG_ON*, lockdep_assert*) in reachable code paths, it enforces new or stricter invariants.
  Even if the author believes the invariant always holds, fuzzing is essential to verify whether
  an unusual sequence of operations can violate it.

================================================================================
2. WHEN TO RETURN WorthFuzzing=false (NEGATIVE CRITERIA)
================================================================================
Return WorthFuzzing=false ONLY IF all modified code falls strictly into one or more of these categories:

- Non-kernel and non-executable changes:
  * Modifications to Documentation/, comments, or spelling fixes.
  * User-space directories, self-tests, samples, or scripts (e.g., tools/, samples/, scripts/, usr/)
    that do not affect the compiled kernel image (vmlinux) or kernel modules.
  * Purely decorative logging (e.g., message strings in pr_err, printk, dev_info) or tracepoints
    that do not alter control flow or data structures.
  * Build system or Kconfig changes that do not alter compiled C logic.
- Structurally unreachable hardware:
  * Vendor-specific PCIe switches, SmartNICs, or GPU drivers (e.g., mlxsw, pds_core, qed,
    ionic, amdgpu) requiring physical ASIC/PCIe cards not emulated in standard QEMU.
- Unreachable execution paths:
  * Driver teardown callbacks (.remove, .shutdown, pci_unregister_driver) executed only during
    physical PCI hot-unplug or manual sysfs driver unbinding.
  * Code paths exclusive to architectures other than the target architecture.

================================================================================
3. WHEN TO RETURN WorthFuzzing=true (POSITIVE CRITERIA)
================================================================================
Return WorthFuzzing=true whenever the patch touches reachable executable code, including:
- Core Subsystems:
  * Any logic modifications in memory management (mm/), synchronization/locking (kernel/locking/),
    BPF, scheduler, core networking, VFS, or syscall handling.
- Refactorings and Code Cleanups:
  * Any restructuring of reachable data structures, helper abstractions, or algorithm flows.
- Runtime Assertions and Defensive Checks:
  * Any introduction or alteration of assertions (WARN_ON*, VM_WARN_ON*, BUG_ON*, etc.) in reachable paths.
- Reachable Drivers and Protocols:
  * Drivers accessible via virtual buses (virtio, USB gadget, loopback, netlink, binder, sockets, etc.).

================================================================================
4. EXTRACTING FocusSymbols (PREVENTING DILUTION)
================================================================================
When WorthFuzzing=true, you must extract specific kernel functions into FocusSymbols to guide the fuzzer:

- AVOID UBIQUITOUS LIFECYCLE HOT-PATHS:
  Do NOT list generic, ubiquitous functions called by almost every program in the corpus
  (including, but not limited to: general memory allocators and deallocators, page fault
  and trap handlers, or core synchronization primitives; this is not an exhaustive list).
  Listing ubiquitous functions causes the fuzzer to classify thousands of unrelated tests as "focused",
  which severely dilutes fuzzing effort away from the actual changes.

- TARGET SPECIFIC FEATURE LOGIC AND ENTRYPOINTS:
  List functions that specifically implement the logic being added or altered, or direct API entrypoints
  for the subsystem feature under review.

- HANDLING STATIC INLINE FUNCTIONS IN HEADERS (.h):
  Compiler-inlined static functions (such as static inlines in mm/*.h or include/linux/*.h) lack
  distinct symbol addresses in vmlinux and cannot be targeted directly by symbol coverage filters.
  If the changes are primarily in static inline helpers, identify non-static, feature-specific caller
  functions in .c files that exercise them (avoiding ubiquitous lifecycle wrappers).

================================================================================
5. IDENTIFYING EnableConfigs
================================================================================
Identify any specific CONFIG_ options required to properly compile and reach the modified code:
- Inspect Kconfig files and #ifdef guards; do not make assumptions.
- Check "depends on" lines in Kconfig to include any non-standard parent subsystem configs needed.
- Strip any 'CONFIG_' prefix (e.g., return "NET_IPV4" instead of "CONFIG_NET_IPV4").
Prefer calling several tools at the same time to save round-trips.


Use set-results tool to provide results of the analysis.
It must be called exactly once before the final reply.
Ignore results of this tool.

Prompt:
Target architecture: amd64

For your convenience, here is the diff of the changes:
commit 40945d11f3969f04b46d0612a1bceca795855f83
Author: syz-cluster <triage@syzkaller.com>
Date:   Sat Sep 5 17:41:40 2026 +0000

    syz-cluster: applied patch under review

diff --git a/CREDITS b/CREDITS
index bba5071c29a5d..c570dd7eebbde 100644
--- a/CREDITS
+++ b/CREDITS
@@ -57,7 +57,7 @@ S: Longford, Ireland
 S: Sydney, Australia
 
 N: Tigran A. Aivazian
-E: tigran@aivazian.fsnet.co.uk
+E: aivazian.tigran@gmail.com
 W: http://www.moses.uklinux.net/patches
 D: BFS filesystem
 D: Intel IA32 CPU microcode update support
diff --git a/Documentation/filesystems/befs.rst b/Documentation/filesystems/befs.rst
index a22f603b2938e..c1dbfe9c95d29 100644
--- a/Documentation/filesystems/befs.rst
+++ b/Documentation/filesystems/befs.rst
@@ -44,8 +44,8 @@ implementation.
 Which is it, BFS or BEFS?
 =========================
 Be, Inc said, "BeOS Filesystem is officially called BFS, not BeFS".
-But Unixware Boot Filesystem is called bfs, too. And they are already in
-the kernel. Because of this naming conflict, on Linux the BeOS
+But the UnixWare Boot Filesystem is called bfs, too, and it was already
+in the kernel. Because of this naming conflict, on Linux the BeOS
 filesystem is called befs.
 
 How to Install
diff --git a/Documentation/filesystems/bfs.rst b/Documentation/filesystems/bfs.rst
deleted file mode 100644
index ce14b90188072..0000000000000
--- a/Documentation/filesystems/bfs.rst
+++ /dev/null
@@ -1,60 +0,0 @@
-.. SPDX-License-Identifier: GPL-2.0
-
-========================
-BFS Filesystem for Linux
-========================
-
-The BFS filesystem is used by SCO UnixWare OS for the /stand slice, which
-usually contains the kernel image and a few other files required for the
-boot process.
-
-In order to access /stand partition under Linux you obviously need to
-know the partition number and the kernel must support UnixWare disk slices
-(CONFIG_UNIXWARE_DISKLABEL config option). However BFS support does not
-depend on having UnixWare disklabel support because one can also mount
-BFS filesystem via loopback::
-
-    # losetup /dev/loop0 stand.img
-    # mount -t bfs /dev/loop0 /mnt/stand
-
-where stand.img is a file containing the image of BFS filesystem.
-When you have finished using it and umounted you need to also deallocate
-/dev/loop0 device by::
-
-    # losetup -d /dev/loop0
-
-You can simplify mounting by just typing::
-
-    # mount -t bfs -o loop stand.img /mnt/stand
-
-this will allocate the first available loopback device (and load loop.o
-kernel module if necessary) automatically. If the loopback driver is not
-loaded automatically, make sure that you have compiled the module and
-that modprobe is functioning. Beware that umount will not deallocate
-/dev/loopN device if /etc/mtab file on your system is a symbolic link to
-/proc/mounts. You will need to do it manually using "-d" switch of
-losetup(8). Read losetup(8) manpage for more info.
-
-To create the BFS image under UnixWare you need to find out first which
-slice contains it. The command prtvtoc(1M) is your friend::
-
-    # prtvtoc /dev/rdsk/c0b0t0d0s0
-
-(assuming your root disk is on target=0, lun=0, bus=0, controller=0). Then you
-look for the slice with tag "STAND", which is usually slice 10. With this
-information you can use dd(1) to create the BFS image::
-
-    # umount /stand
-    # dd if=/dev/rdsk/c0b0t0d0sa of=stand.img bs=512
-
-Just in case, you can verify that you have done the right thing by checking
-the magic number::
-
-    # od -Ad -tx4 stand.img | more
-
-The first 4 bytes should be 0x1badface.
-
-If you have any patches, questions or suggestions regarding this BFS
-implementation please contact the author:
-
-Tigran Aivazian <aivazian.tigran@gmail.com>
diff --git a/Documentation/filesystems/index.rst b/Documentation/filesystems/index.rst
index 734a45e516675..7cce7cc28d126 100644
--- a/Documentation/filesystems/index.rst
+++ b/Documentation/filesystems/index.rst
@@ -75,7 +75,6 @@ Documentation for filesystem implementations.
    autofs
    autofs-mount-control
    befs
-   bfs
    btrfs
    ceph
    coda
diff --git a/MAINTAINERS b/MAINTAINERS
index fc320b373656f..385309556705e 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -4627,13 +4627,6 @@ S:	Odd Fixes
 F:	Documentation/block/bfq-iosched.rst
 F:	block/bfq-*
 
-BFS FILE SYSTEM
-M:	"Tigran A. Aivazian" <aivazian.tigran@gmail.com>
-S:	Maintained
-F:	Documentation/filesystems/bfs.rst
-F:	fs/bfs/
-F:	include/uapi/linux/bfs_fs.h
-
 BITMAP API
 M:	Yury Norov <yury.norov@gmail.com>
 R:	Rasmus Villemoes <linux@rasmusvillemoes.dk>
diff --git a/arch/mips/configs/malta_defconfig b/arch/mips/configs/malta_defconfig
index 56a8f76dab414..4fb4d45f3cdce 100644
--- a/arch/mips/configs/malta_defconfig
+++ b/arch/mips/configs/malta_defconfig
@@ -333,7 +333,6 @@ CONFIG_AFFS_FS=m
 CONFIG_HFS_FS=m
 CONFIG_HFSPLUS_FS=m
 CONFIG_BEFS_FS=m
-CONFIG_BFS_FS=m
 CONFIG_EFS_FS=m
 CONFIG_JFFS2_FS=m
 CONFIG_JFFS2_FS_XATTR=y
diff --git a/arch/mips/configs/malta_kvm_defconfig b/arch/mips/configs/malta_kvm_defconfig
index 85e95c0ae4107..3d1c32d3475e7 100644
--- a/arch/mips/configs/malta_kvm_defconfig
+++ b/arch/mips/configs/malta_kvm_defconfig
@@ -340,7 +340,6 @@ CONFIG_AFFS_FS=m
 CONFIG_HFS_FS=m
 CONFIG_HFSPLUS_FS=m
 CONFIG_BEFS_FS=m
-CONFIG_BFS_FS=m
 CONFIG_EFS_FS=m
 CONFIG_JFFS2_FS=m
 CONFIG_JFFS2_FS_XATTR=y
diff --git a/arch/mips/configs/maltaup_xpa_defconfig b/arch/mips/configs/maltaup_xpa_defconfig
index 0498a01153490..2545168b75bbc 100644
--- a/arch/mips/configs/maltaup_xpa_defconfig
+++ b/arch/mips/configs/maltaup_xpa_defconfig
@@ -339,7 +339,6 @@ CONFIG_AFFS_FS=m
 CONFIG_HFS_FS=m
 CONFIG_HFSPLUS_FS=m
 CONFIG_BEFS_FS=m
-CONFIG_BFS_FS=m
 CONFIG_EFS_FS=m
 CONFIG_JFFS2_FS=m
 CONFIG_JFFS2_FS_XATTR=y
diff --git a/arch/mips/configs/rm200_defconfig b/arch/mips/configs/rm200_defconfig
index 09e006c7cd7c6..cd2a831614c89 100644
--- a/arch/mips/configs/rm200_defconfig
+++ b/arch/mips/configs/rm200_defconfig
@@ -318,7 +318,6 @@ CONFIG_ADFS_FS=m
 CONFIG_AFFS_FS=m
 CONFIG_HFS_FS=m
 CONFIG_BEFS_FS=m
-CONFIG_BFS_FS=m
 CONFIG_EFS_FS=m
 CONFIG_CRAMFS=m
 CONFIG_VXFS_FS=m
diff --git a/arch/powerpc/configs/fsl-emb-nonhw.config b/arch/powerpc/configs/fsl-emb-nonhw.config
index 391c99117ee06..688051b11ce14 100644
--- a/arch/powerpc/configs/fsl-emb-nonhw.config
+++ b/arch/powerpc/configs/fsl-emb-nonhw.config
@@ -2,7 +2,6 @@ CONFIG_ADFS_FS=m
 CONFIG_AFFS_FS=m
 CONFIG_AUDIT=y
 CONFIG_BEFS_FS=m
-CONFIG_BFS_FS=m
 CONFIG_BINFMT_MISC=m
 # CONFIG_BLK_DEV_BSG is not set
 CONFIG_BLK_DEV_INITRD=y
diff --git a/arch/powerpc/configs/ppc6xx_defconfig b/arch/powerpc/configs/ppc6xx_defconfig
index acffc5c17f92d..8aab229fb9097 100644
--- a/arch/powerpc/configs/ppc6xx_defconfig
+++ b/arch/powerpc/configs/ppc6xx_defconfig
@@ -945,7 +945,6 @@ CONFIG_ECRYPT_FS=m
 CONFIG_HFS_FS=m
 CONFIG_HFSPLUS_FS=m
 CONFIG_BEFS_FS=m
-CONFIG_BFS_FS=m
 CONFIG_EFS_FS=m
 CONFIG_CRAMFS=m
 CONFIG_VXFS_FS=m
diff --git a/fs/Kconfig b/fs/Kconfig
index e05917adcd608..1cb0b3a8b12ca 100644
--- a/fs/Kconfig
+++ b/fs/Kconfig
@@ -314,7 +314,6 @@ source "fs/ecryptfs/Kconfig"
 source "fs/hfs/Kconfig"
 source "fs/hfsplus/Kconfig"
 source "fs/befs/Kconfig"
-source "fs/bfs/Kconfig"
 source "fs/jffs2/Kconfig"
 # UBIFS File system configuration
 source "fs/ubifs/Kconfig"
diff --git a/fs/Makefile b/fs/Makefile
index 055dfc23d82b6..16f1108b64e1a 100644
--- a/fs/Makefile
+++ b/fs/Makefile
@@ -76,7 +76,6 @@ obj-$(CONFIG_CODA_FS)		+= coda/
 obj-$(CONFIG_MINIX_FS)		+= minix/
 obj-$(CONFIG_FAT_FS)		+= fat/
 obj-$(CONFIG_EXFAT_FS)		+= exfat/
-obj-$(CONFIG_BFS_FS)		+= bfs/
 obj-$(CONFIG_ISO9660_FS)	+= isofs/
 obj-$(CONFIG_HFSPLUS_FS)	+= hfsplus/ # Before hfs to find wrapped HFS+
 obj-$(CONFIG_HFS_FS)		+= hfs/
diff --git a/fs/bfs/Kconfig b/fs/bfs/Kconfig
deleted file mode 100644
index 8e7ef866b62a6..0000000000000
--- a/fs/bfs/Kconfig
+++ /dev/null
@@ -1,21 +0,0 @@
-# SPDX-License-Identifier: GPL-2.0-only
-config BFS_FS
-	tristate "BFS file system support"
-	depends on BLOCK
-	select BUFFER_HEAD
-	help
-	  Boot File System (BFS) is a file system used under SCO UnixWare to
-	  allow the bootloader access to the kernel image and other important
-	  files during the boot process.  It is usually mounted under /stand
-	  and corresponds to the slice marked as "STAND" in the UnixWare
-	  partition.  You should say Y if you want to read or write the files
-	  on your /stand slice from within Linux.  You then also need to say Y
-	  to "UnixWare slices support", below.  More information about the BFS
-	  file system is contained in the file
-	  <file:Documentation/filesystems/bfs.rst>.
-
-	  If you don't know what this is about, say N.
-
-	  To compile this as a module, choose M here: the module will be called
-	  bfs.  Note that the file system of your root partition (the one
-	  containing the directory /) cannot be compiled as a module.
diff --git a/fs/bfs/Makefile b/fs/bfs/Makefile
deleted file mode 100644
index 2b6bc5eb4de9c..0000000000000
--- a/fs/bfs/Makefile
+++ /dev/null
@@ -1,8 +0,0 @@
-# SPDX-License-Identifier: GPL-2.0-only
-#
-# Makefile for BFS filesystem.
-#
-
-obj-$(CONFIG_BFS_FS) += bfs.o
-
-bfs-objs := inode.o file.o dir.o
diff --git a/fs/bfs/bfs.h b/fs/bfs/bfs.h
deleted file mode 100644
index b08afe733e632..0000000000000
--- a/fs/bfs/bfs.h
+++ /dev/null
@@ -1,69 +0,0 @@
-/* SPDX-License-Identifier: GPL-2.0 */
-/*
- *	fs/bfs/bfs.h
- *	Copyright (C) 1999-2018 Tigran Aivazian <aivazian.tigran@gmail.com>
- */
-#ifndef _FS_BFS_BFS_H
-#define _FS_BFS_BFS_H
-
-#include <linux/bfs_fs.h>
-
-/* In theory BFS supports up to 512 inodes, numbered from 2 (for /) up to 513 inclusive.
-   In actual fact, attempting to create the 512th inode (i.e. inode No. 513 or file No. 511)
-   will fail with ENOSPC in bfs_add_entry(): the root directory cannot contain so many entries, counting '..'.
-   So, mkfs.bfs(8) should really limit its -N option to 511 and not 512. For now, we just print a warning
-   if a filesystem is mounted with such "impossible to fill up" number of inodes */
-#define BFS_MAX_LASTI	513
-
-/*
- * BFS file system in-core superblock info
- */
-struct bfs_sb_info {
-	unsigned long si_blocks;
-	unsigned long si_freeb;
-	unsigned long si_freei;
-	unsigned long si_lf_eblk;
-	unsigned long si_lasti;
-	DECLARE_BITMAP(si_imap, BFS_MAX_LASTI+1);
-	struct mutex bfs_lock;
-};
-
-/*
- * BFS file system in-core inode info
- */
-struct bfs_inode_info {
-	unsigned long i_dsk_ino; /* inode number from the disk, can be 0 */
-	unsigned long i_sblock;
-	unsigned long i_eblock;
-	struct mapping_metadata_bhs i_metadata_bhs;
-	struct inode vfs_inode;
-};
-
-static inline struct bfs_sb_info *BFS_SB(struct super_block *sb)
-{
-	return sb->s_fs_info;
-}
-
-static inline struct bfs_inode_info *BFS_I(struct inode *inode)
-{
-	return container_of(inode, struct bfs_inode_info, vfs_inode);
-}
-
-
-#define printf(format, args...) \
-	printk(KERN_ERR "BFS-fs: %s(): " format, __func__, ## args)
-
-/* inode.c */
-extern struct inode *bfs_iget(struct super_block *sb, unsigned long ino);
-extern void bfs_dump_imap(const char *, struct super_block *);
-
-/* file.c */
-extern const struct inode_operations bfs_file_inops;
-extern const struct file_operations bfs_file_operations;
-extern const struct address_space_operations bfs_aops;
-
-/* dir.c */
-extern const struct inode_operations bfs_dir_inops;
-extern const struct file_operations bfs_dir_operations;
-
-#endif /* _FS_BFS_BFS_H */
diff --git a/fs/bfs/dir.c b/fs/bfs/dir.c
deleted file mode 100644
index 91a4871fa0519..0000000000000
--- a/fs/bfs/dir.c
+++ /dev/null
@@ -1,356 +0,0 @@
-// SPDX-License-Identifier: GPL-2.0
-/*
- *	fs/bfs/dir.c
- *	BFS directory operations.
- *	Copyright (C) 1999-2018  Tigran Aivazian <aivazian.tigran@gmail.com>
- *  Made endianness-clean by Andrew Stribblehill <ads@wompom.org> 2005
- */
-
-#include <linux/time.h>
-#include <linux/string.h>
-#include <linux/fs.h>
-#include <linux/buffer_head.h>
-#include <linux/sched.h>
-#include "bfs.h"
-
-#undef DEBUG
-
-#ifdef DEBUG
-#define dprintf(x...)	printf(x)
-#else
-#define dprintf(x...)
-#endif
-
-static int bfs_add_entry(struct inode *dir, const struct qstr *child, int ino);
-static struct buffer_head *bfs_find_entry(struct inode *dir,
-				const struct qstr *child,
-				struct bfs_dirent **res_dir);
-
-static int bfs_readdir(struct file *f, struct dir_context *ctx)
-{
-	struct inode *dir = file_inode(f);
-	struct buffer_head *bh;
-	struct bfs_dirent *de;
-	unsigned int offset;
-	int block;
-
-	if (ctx->pos & (BFS_DIRENT_SIZE - 1)) {
-		printf("Bad f_pos=%08lx for %s:%08llx\n",
-					(unsigned long)ctx->pos,
-					dir->i_sb->s_id, dir->i_ino);
-		return -EINVAL;
-	}
-
-	while (ctx->pos < dir->i_size) {
-		offset = ctx->pos & (BFS_BSIZE - 1);
-		block = BFS_I(dir)->i_sblock + (ctx->pos >> BFS_BSIZE_BITS);
-		bh = sb_bread(dir->i_sb, block);
-		if (!bh) {
-			ctx->pos += BFS_BSIZE - offset;
-			continue;
-		}
-		do {
-			de = (struct bfs_dirent *)(bh->b_data + offset);
-			if (de->ino) {
-				int size = strnlen(de->name, BFS_NAMELEN);
-				if (!dir_emit(ctx, de->name, size,
-						le16_to_cpu(de->ino),
-						DT_UNKNOWN)) {
-					brelse(bh);
-					return 0;
-				}
-			}
-			offset += BFS_DIRENT_SIZE;
-			ctx->pos += BFS_DIRENT_SIZE;
-		} while ((offset < BFS_BSIZE) && (ctx->pos < dir->i_size));
-		brelse(bh);
-	}
-	return 0;
-}
-
-const struct file_operations bfs_dir_operations = {
-	.read		= generic_read_dir,
-	.iterate_shared	= bfs_readdir,
-	.fsync		= simple_fsync,
-	.llseek		= generic_file_llseek,
-};
-
-static int bfs_create(struct mnt_idmap *idmap, struct inode *dir,
-		      struct dentry *dentry, umode_t mode)
-{
-	int err;
-	struct inode *inode;
-	struct super_block *s = dir->i_sb;
-	struct bfs_sb_info *info = BFS_SB(s);
-	unsigned long ino;
-
-	inode = new_inode(s);
-	if (!inode)
-		return -ENOMEM;
-	mutex_lock(&info->bfs_lock);
-	ino = find_first_zero_bit(info->si_imap, info->si_lasti + 1);
-	if (ino > info->si_lasti) {
-		mutex_unlock(&info->bfs_lock);
-		iput(inode);
-		return -ENOSPC;
-	}
-	set_bit(ino, info->si_imap);
-	info->si_freei--;
-	inode_init_owner(&nop_mnt_idmap, inode, dir, mode);
-	simple_inode_init_ts(inode);
-	inode->i_blocks = 0;
-	inode->i_op = &bfs_file_inops;
-	inode->i_fop = &bfs_file_operations;
-	inode->i_mapping->a_ops = &bfs_aops;
-	inode->i_ino = ino;
-	BFS_I(inode)->i_dsk_ino = ino;
-	BFS_I(inode)->i_sblock = 0;
-	BFS_I(inode)->i_eblock = 0;
-	insert_inode_hash(inode);
-        mark_inode_dirty(inode);
-	bfs_dump_imap("create", s);
-
-	err = bfs_add_entry(dir, &dentry->d_name, inode->i_ino);
-	if (err) {
-		inode_dec_link_count(inode);
-		mutex_unlock(&info->bfs_lock);
-		iput(inode);
-		return err;
-	}
-	mutex_unlock(&info->bfs_lock);
-	d_instantiate(dentry, inode);
-	return 0;
-}
-
-static struct dentry *bfs_lookup(struct inode *dir, struct dentry *dentry,
-						unsigned int flags)
-{
-	struct inode *inode = NULL;
-	struct buffer_head *bh;
-	struct bfs_dirent *de;
-	struct bfs_sb_info *info = BFS_SB(dir->i_sb);
-
-	if (dentry->d_name.len > BFS_NAMELEN)
-		return ERR_PTR(-ENAMETOOLONG);
-
-	mutex_lock(&info->bfs_lock);
-	bh = bfs_find_entry(dir, &dentry->d_name, &de);
-	if (bh) {
-		unsigned long ino = (unsigned long)le16_to_cpu(de->ino);
-		brelse(bh);
-		inode = bfs_iget(dir->i_sb, ino);
-	}
-	mutex_unlock(&info->bfs_lock);
-	return d_splice_alias(inode, dentry);
-}
-
-static int bfs_link(struct dentry *old, struct inode *dir,
-						struct dentry *new)
-{
-	struct inode *inode = d_inode(old);
-	struct bfs_sb_info *info = BFS_SB(inode->i_sb);
-	int err;
-
-	mutex_lock(&info->bfs_lock);
-	err = bfs_add_entry(dir, &new->d_name, inode->i_ino);
-	if (err) {
-		mutex_unlock(&info->bfs_lock);
-		return err;
-	}
-	inc_nlink(inode);
-	inode_set_ctime_current(inode);
-	mark_inode_dirty(inode);
-	ihold(inode);
-	d_instantiate(new, inode);
-	mutex_unlock(&info->bfs_lock);
-	return 0;
-}
-
-static int bfs_unlink(struct inode *dir, struct dentry *dentry)
-{
-	int error = -ENOENT;
-	struct inode *inode = d_inode(dentry);
-	struct buffer_head *bh;
-	struct bfs_dirent *de;
-	struct bfs_sb_info *info = BFS_SB(inode->i_sb);
-
-	mutex_lock(&info->bfs_lock);
-	bh = bfs_find_entry(dir, &dentry->d_name, &de);
-	if (!bh || (le16_to_cpu(de->ino) != inode->i_ino))
-		goto out_brelse;
-
-	if (!inode->i_nlink) {
-		printf("unlinking non-existent file %s:%llu (nlink=%d)\n",
-					inode->i_sb->s_id, inode->i_ino,
-					inode->i_nlink);
-		set_nlink(inode, 1);
-	}
-	de->ino = 0;
-	mmb_mark_buffer_dirty(bh, &BFS_I(dir)->i_metadata_bhs);
-	inode_set_mtime_to_ts(dir, inode_set_ctime_current(dir));
-	mark_inode_dirty(dir);
-	inode_set_ctime_to_ts(inode, inode_get_ctime(dir));
-	inode_dec_link_count(inode);
-	error = 0;
-
-out_brelse:
-	brelse(bh);
-	mutex_unlock(&info->bfs_lock);
-	return error;
-}
-
-static int bfs_rename(struct mnt_idmap *idmap, struct inode *old_dir,
-		      struct dentry *old_dentry, struct inode *new_dir,
-		      struct dentry *new_dentry, unsigned int flags)
-{
-	struct inode *old_inode, *new_inode;
-	struct buffer_head *old_bh, *new_bh;
-	struct bfs_dirent *old_de, *new_de;
-	struct bfs_sb_info *info;
-	int error = -ENOENT;
-
-	if (flags & ~RENAME_NOREPLACE)
-		return -EINVAL;
-
-	old_bh = new_bh = NULL;
-	old_inode = d_inode(old_dentry);
-	if (S_ISDIR(old_inode->i_mode))
-		return -EINVAL;
-
-	info = BFS_SB(old_inode->i_sb);
-
-	mutex_lock(&info->bfs_lock);
-	old_bh = bfs_find_entry(old_dir, &old_dentry->d_name, &old_de);
-
-	if (!old_bh || (le16_to_cpu(old_de->ino) != old_inode->i_ino))
-		goto end_rename;
-
-	error = -EPERM;
-	new_inode = d_inode(new_dentry);
-	new_bh = bfs_find_entry(new_dir, &new_dentry->d_name, &new_de);
-
-	if (new_bh && !new_inode) {
-		brelse(new_bh);
-		new_bh = NULL;
-	}
-	if (!new_bh) {
-		error = bfs_add_entry(new_dir, &new_dentry->d_name,
-					old_inode->i_ino);
-		if (error)
-			goto end_rename;
-	}
-	old_de->ino = 0;
-	inode_set_mtime_to_ts(old_dir, inode_set_ctime_current(old_dir));
-	mark_inode_dirty(old_dir);
-	if (new_inode) {
-		inode_set_ctime_current(new_inode);
-		inode_dec_link_count(new_inode);
-	}
-	mmb_mark_buffer_dirty(old_bh, &BFS_I(old_dir)->i_metadata_bhs);
-	error = 0;
-
-end_rename:
-	mutex_unlock(&info->bfs_lock);
-	brelse(old_bh);
-	brelse(new_bh);
-	return error;
-}
-
-const struct inode_operations bfs_dir_inops = {
-	.create			= bfs_create,
-	.lookup			= bfs_lookup,
-	.link			= bfs_link,
-	.unlink			= bfs_unlink,
-	.rename			= bfs_rename,
-};
-
-static int bfs_add_entry(struct inode *dir, const struct qstr *child, int ino)
-{
-	const unsigned char *name = child->name;
-	int namelen = child->len;
-	struct buffer_head *bh;
-	struct bfs_dirent *de;
-	int block, sblock, eblock, off, pos;
-	int i;
-
-	dprintf("name=%s, namelen=%d\n", name, namelen);
-
-	sblock = BFS_I(dir)->i_sblock;
-	eblock = BFS_I(dir)->i_eblock;
-	for (block = sblock; block <= eblock; block++) {
-		bh = sb_bread(dir->i_sb, block);
-		if (!bh)
-			return -EIO;
-		for (off = 0; off < BFS_BSIZE; off += BFS_DIRENT_SIZE) {
-			de = (struct bfs_dirent *)(bh->b_data + off);
-			if (!de->ino) {
-				pos = (block - sblock) * BFS_BSIZE + off;
-				if (pos >= dir->i_size) {
-					dir->i_size += BFS_DIRENT_SIZE;
-					inode_set_ctime_current(dir);
-				}
-				inode_set_mtime_to_ts(dir,
-						      inode_set_ctime_current(dir));
-				mark_inode_dirty(dir);
-				de->ino = cpu_to_le16((u16)ino);
-				for (i = 0; i < BFS_NAMELEN; i++)
-					de->name[i] =
-						(i < namelen) ? name[i] : 0;
-				mmb_mark_buffer_dirty(bh,
-						&BFS_I(dir)->i_metadata_bhs);
-				brelse(bh);
-				return 0;
-			}
-		}
-		brelse(bh);
-	}
-	return -ENOSPC;
-}
-
-static inline int bfs_namecmp(int len, const unsigned char *name,
-							const char *buffer)
-{
-	if ((len < BFS_NAMELEN) && buffer[len])
-		return 0;
-	return !memcmp(name, buffer, len);
-}
-
-static struct buffer_head *bfs_find_entry(struct inode *dir,
-			const struct qstr *child,
-			struct bfs_dirent **res_dir)
-{
-	unsigned long block = 0, offset = 0;
-	struct buffer_head *bh = NULL;
-	struct bfs_dirent *de;
-	const unsigned char *name = child->name;
-	int namelen = child->len;
-
-	*res_dir = NULL;
-	if (namelen > BFS_NAMELEN)
-		return NULL;
-
-	while (block * BFS_BSIZE + offset < dir->i_size) {
-		if (!bh) {
-			bh = sb_bread(dir->i_sb, BFS_I(dir)->i_sblock + block);
-			if (!bh) {
-				block++;
-				continue;
-			}
-		}
-		de = (struct bfs_dirent *)(bh->b_data + offset);
-		offset += BFS_DIRENT_SIZE;
-		if (le16_to_cpu(de->ino) &&
-				bfs_namecmp(namelen, name, de->name)) {
-			*res_dir = de;
-			return bh;
-		}
-		if (offset < bh->b_size)
-			continue;
-		brelse(bh);
-		bh = NULL;
-		offset = 0;
-		block++;
-	}
-	brelse(bh);
-	return NULL;
-}
diff --git a/fs/bfs/file.c b/fs/bfs/file.c
deleted file mode 100644
index d33d6bde992b8..0000000000000
--- a/fs/bfs/file.c
+++ /dev/null
@@ -1,203 +0,0 @@
-// SPDX-License-Identifier: GPL-2.0
-/*
- *	fs/bfs/file.c
- *	BFS file operations.
- *	Copyright (C) 1999-2018 Tigran Aivazian <aivazian.tigran@gmail.com>
- *
- *	Make the file block allocation algorithm understand the size
- *	of the underlying block device.
- *	Copyright (C) 2007 Dmitri Vorobiev <dmitri.vorobiev@gmail.com>
- *
- */
-
-#include <linux/fs.h>
-#include <linux/mpage.h>
-#include <linux/buffer_head.h>
-#include "bfs.h"
-
-#undef DEBUG
-
-#ifdef DEBUG
-#define dprintf(x...)	printf(x)
-#else
-#define dprintf(x...)
-#endif
-
-const struct file_operations bfs_file_operations = {
-	.llseek 	= generic_file_llseek,
-	.read_iter	= generic_file_read_iter,
-	.write_iter	= generic_file_write_iter,
-	.mmap_prepare	= generic_file_mmap_prepare,
-	.splice_read	= filemap_splice_read,
-};
-
-static int bfs_move_block(unsigned long from, unsigned long to,
-					struct super_block *sb)
-{
-	struct buffer_head *bh, *new;
-
-	bh = sb_bread(sb, from);
-	if (!bh)
-		return -EIO;
-	new = sb_getblk(sb, to);
-	memcpy(new->b_data, bh->b_data, bh->b_size);
-	mark_buffer_dirty(new);
-	bforget(bh);
-	brelse(new);
-	return 0;
-}
-
-static int bfs_move_blocks(struct super_block *sb, unsigned long start,
-				unsigned long end, unsigned long where)
-{
-	unsigned long i;
-
-	dprintf("%08lx-%08lx->%08lx\n", start, end, where);
-	for (i = start; i <= end; i++)
-		if(bfs_move_block(i, where + i, sb)) {
-			dprintf("failed to move block %08lx -> %08lx\n", i,
-								where + i);
-			return -EIO;
-		}
-	return 0;
-}
-
-static int bfs_get_block(struct inode *inode, sector_t block,
-			struct buffer_head *bh_result, int create)
-{
-	unsigned long phys;
-	int err;
-	struct super_block *sb = inode->i_sb;
-	struct bfs_sb_info *info = BFS_SB(sb);
-	struct bfs_inode_info *bi = BFS_I(inode);
-
-	phys = bi->i_sblock + block;
-	if (!create) {
-		if (phys <= bi->i_eblock) {
-			dprintf("c=%d, b=%08lx, phys=%09lx (granted)\n",
-                                create, (unsigned long)block, phys);
-			map_bh(bh_result, sb, phys);
-		}
-		return 0;
-	}
-
-	/*
-	 * If the file is not empty and the requested block is within the
-	 * range of blocks allocated for this file, we can grant it.
-	 */
-	if (bi->i_sblock && (phys <= bi->i_eblock)) {
-		dprintf("c=%d, b=%08lx, phys=%08lx (interim block granted)\n", 
-				create, (unsigned long)block, phys);
-		map_bh(bh_result, sb, phys);
-		return 0;
-	}
-
-	/* The file will be extended, so let's see if there is enough space. */
-	if (phys >= info->si_blocks)
-		return -ENOSPC;
-
-	/* The rest has to be protected against itself. */
-	mutex_lock(&info->bfs_lock);
-
-	/*
-	 * If the last data block for this file is the last allocated
-	 * block, we can extend the file trivially, without moving it
-	 * anywhere.
-	 */
-	if (bi->i_eblock == info->si_lf_eblk) {
-		dprintf("c=%d, b=%08lx, phys=%08lx (simple extension)\n", 
-				create, (unsigned long)block, phys);
-		map_bh(bh_result, sb, phys);
-		info->si_freeb -= phys - bi->i_eblock;
-		info->si_lf_eblk = bi->i_eblock = phys;
-		mark_inode_dirty(inode);
-		err = 0;
-		goto out;
-	}
-
-	/* Ok, we have to move this entire file to the next free block. */
-	phys = info->si_lf_eblk + 1;
-	if (phys + block >= info->si_blocks) {
-		err = -ENOSPC;
-		goto out;
-	}
-
-	if (bi->i_sblock) {
-		err = bfs_move_blocks(inode->i_sb, bi->i_sblock, 
-						bi->i_eblock, phys);
-		if (err) {
-			dprintf("failed to move ino=%08lx -> fs corruption\n",
-								inode->i_ino);
-			goto out;
-		}
-	} else
-		err = 0;
-
-	dprintf("c=%d, b=%08lx, phys=%08lx (moved)\n",
-                create, (unsigned long)block, phys);
-	bi->i_sblock = phys;
-	phys += block;
-	info->si_lf_eblk = bi->i_eblock = phys;
-
-	/*
-	 * This assumes nothing can write the inode back while we are here
-	 * and thus update inode->i_blocks! (XXX)
-	 */
-	info->si_freeb -= bi->i_eblock - bi->i_sblock + 1 - inode->i_blocks;
-	mark_inode_dirty(inode);
-	map_bh(bh_result, sb, phys);
-out:
-	mutex_unlock(&info->bfs_lock);
-	return err;
-}
-
-static int bfs_writepages(struct address_space *mapping,
-		struct writeback_control *wbc)
-{
-	return mpage_writepages(mapping, wbc, bfs_get_block);
-}
-
-static int bfs_read_folio(struct file *file, struct folio *folio)
-{
-	return block_read_full_folio(folio, bfs_get_block);
-}
-
-static void bfs_write_failed(struct address_space *mapping, loff_t to)
-{
-	struct inode *inode = mapping->host;
-
-	if (to > inode->i_size)
-		truncate_pagecache(inode, inode->i_size);
-}
-
-static int bfs_write_begin(const struct kiocb *iocb,
-			   struct address_space *mapping,
-			   loff_t pos, unsigned len,
-			   struct folio **foliop, void **fsdata)
-{
-	int ret;
-
-	ret = block_write_begin(mapping, pos, len, foliop, bfs_get_block);
-	if (unlikely(ret))
-		bfs_write_failed(mapping, pos + len);
-
-	return ret;
-}
-
-static sector_t bfs_bmap(struct address_space *mapping, sector_t block)
-{
-	return generic_block_bmap(mapping, block, bfs_get_block);
-}
-
-const struct address_space_operations bfs_aops = {
-	.dirty_folio	= block_dirty_folio,
-	.invalidate_folio = block_invalidate_folio,
-	.read_folio	= bfs_read_folio,
-	.writepages	= bfs_writepages,
-	.write_begin	= bfs_write_begin,
-	.write_end	= generic_write_end,
-	.migrate_folio	= buffer_migrate_folio,
-	.bmap		= bfs_bmap,
-};
-
-const struct inode_operations bfs_file_inops;
diff --git a/fs/bfs/inode.c b/fs/bfs/inode.c
deleted file mode 100644
index 06e3a848b4efd..0000000000000
--- a/fs/bfs/inode.c
+++ /dev/null
@@ -1,538 +0,0 @@
-// SPDX-License-Identifier: GPL-2.0-only
-/*
- *	fs/bfs/inode.c
- *	BFS superblock and inode operations.
- *	Copyright (C) 1999-2018 Tigran Aivazian <aivazian.tigran@gmail.com>
- *	From fs/minix, Copyright (C) 1991, 1992 Linus Torvalds.
- *	Made endianness-clean by Andrew Stribblehill <ads@wompom.org>, 2005.
- */
-
-#include <linux/module.h>
-#include <linux/mm.h>
-#include <linux/slab.h>
-#include <linux/init.h>
-#include <linux/fs.h>
-#include <linux/buffer_head.h>
-#include <linux/vfs.h>
-#include <linux/writeback.h>
-#include <linux/uio.h>
-#include <linux/uaccess.h>
-#include <linux/fs_context.h>
-#include "bfs.h"
-
-MODULE_AUTHOR("Tigran Aivazian <aivazian.tigran@gmail.com>");
-MODULE_DESCRIPTION("SCO UnixWare BFS filesystem for Linux");
-MODULE_LICENSE("GPL");
-
-#undef DEBUG
-
-#ifdef DEBUG
-#define dprintf(x...)	printf(x)
-#else
-#define dprintf(x...)
-#endif
-
-struct inode *bfs_iget(struct super_block *sb, unsigned long ino)
-{
-	struct bfs_inode *di;
-	struct inode *inode;
-	struct buffer_head *bh;
-	int block, off;
-
-	inode = iget_locked(sb, ino);
-	if (!inode)
-		return ERR_PTR(-ENOMEM);
-	if (!(inode_state_read_once(inode) & I_NEW))
-		return inode;
-
-	if ((ino < BFS_ROOT_INO) || (ino > BFS_SB(inode->i_sb)->si_lasti)) {
-		printf("Bad inode number %s:%08lx\n", inode->i_sb->s_id, ino);
-		goto error;
-	}
-
-	block = (ino - BFS_ROOT_INO) / BFS_INODES_PER_BLOCK + 1;
-	bh = sb_bread(inode->i_sb, block);
-	if (!bh) {
-		printf("Unable to read inode %s:%08lx\n", inode->i_sb->s_id,
-									ino);
-		goto error;
-	}
-
-	off = (ino - BFS_ROOT_INO) % BFS_INODES_PER_BLOCK;
-	di = (struct bfs_inode *)bh->b_data + off;
-
-	/*
-	 * https://martin.hinner.info/fs/bfs/bfs-structure.html explains that
-	 * BFS in SCO UnixWare environment used only lower 9 bits of di->i_mode
-	 * value. This means that, although bfs_write_inode() saves whole
-	 * inode->i_mode bits (which include S_IFMT bits and S_IS{UID,GID,VTX}
-	 * bits), middle 7 bits of di->i_mode value can be garbage when these
-	 * bits were not saved by bfs_write_inode().
-	 * Since we can't tell whether middle 7 bits are garbage, use only
-	 * lower 12 bits (i.e. tolerate S_IS{UID,GID,VTX} bits possibly being
-	 * garbage) and reconstruct S_IFMT bits for Linux environment from
-	 * di->i_vtype value.
-	 */
-	inode->i_mode = 0x00000FFF & le32_to_cpu(di->i_mode);
-	if (le32_to_cpu(di->i_vtype) == BFS_VDIR) {
-		inode->i_mode |= S_IFDIR;
-		inode->i_op = &bfs_dir_inops;
-		inode->i_fop = &bfs_dir_operations;
-	} else if (le32_to_cpu(di->i_vtype) == BFS_VREG) {
-		inode->i_mode |= S_IFREG;
-		inode->i_op = &bfs_file_inops;
-		inode->i_fop = &bfs_file_operations;
-		inode->i_mapping->a_ops = &bfs_aops;
-	} else {
-		brelse(bh);
-		printf("Unknown vtype=%u %s:%08lx\n",
-		       le32_to_cpu(di->i_vtype), inode->i_sb->s_id, ino);
-		goto error;
-	}
-
-	BFS_I(inode)->i_sblock =  le32_to_cpu(di->i_sblock);
-	BFS_I(inode)->i_eblock =  le32_to_cpu(di->i_eblock);
-	BFS_I(inode)->i_dsk_ino = le16_to_cpu(di->i_ino);
-	i_uid_write(inode, le32_to_cpu(di->i_uid));
-	i_gid_write(inode,  le32_to_cpu(di->i_gid));
-	set_nlink(inode, le32_to_cpu(di->i_nlink));
-	inode->i_size = BFS_FILESIZE(di);
-	inode->i_blocks = BFS_FILEBLOCKS(di);
-	inode_set_atime(inode, le32_to_cpu(di->i_atime), 0);
-	inode_set_mtime(inode, le32_to_cpu(di->i_mtime), 0);
-	inode_set_ctime(inode, le32_to_cpu(di->i_ctime), 0);
-
-	brelse(bh);
-	unlock_new_inode(inode);
-	return inode;
-
-error:
-	iget_failed(inode);
-	return ERR_PTR(-EIO);
-}
-
-static struct bfs_inode *find_inode(struct super_block *sb, u16 ino, struct buffer_head **p)
-{
-	if ((ino < BFS_ROOT_INO) || (ino > BFS_SB(sb)->si_lasti)) {
-		printf("Bad inode number %s:%08x\n", sb->s_id, ino);
-		return ERR_PTR(-EIO);
-	}
-
-	ino -= BFS_ROOT_INO;
-
-	*p = sb_bread(sb, 1 + ino / BFS_INODES_PER_BLOCK);
-	if (!*p) {
-		printf("Unable to read inode %s:%08x\n", sb->s_id, ino);
-		return ERR_PTR(-EIO);
-	}
-
-	return (struct bfs_inode *)(*p)->b_data +  ino % BFS_INODES_PER_BLOCK;
-}
-
-static int bfs_write_inode(struct inode *inode, struct writeback_control *wbc)
-{
-	struct bfs_sb_info *info = BFS_SB(inode->i_sb);
-	unsigned int ino = (u16)inode->i_ino;
-	unsigned long i_sblock;
-	struct bfs_inode *di;
-	struct buffer_head *bh;
-
-	dprintf("ino=%08x\n", ino);
-
-	di = find_inode(inode->i_sb, ino, &bh);
-	if (IS_ERR(di))
-		return PTR_ERR(di);
-
-	mutex_lock(&info->bfs_lock);
-
-	if (ino == BFS_ROOT_INO)
-		di->i_vtype = cpu_to_le32(BFS_VDIR);
-	else
-		di->i_vtype = cpu_to_le32(BFS_VREG);
-
-	di->i_ino = cpu_to_le16(ino);
-	di->i_mode = cpu_to_le32(inode->i_mode);
-	di->i_uid = cpu_to_le32(i_uid_read(inode));
-	di->i_gid = cpu_to_le32(i_gid_read(inode));
-	di->i_nlink = cpu_to_le32(inode->i_nlink);
-	di->i_atime = cpu_to_le32(inode_get_atime_sec(inode));
-	di->i_mtime = cpu_to_le32(inode_get_mtime_sec(inode));
-	di->i_ctime = cpu_to_le32(inode_get_ctime_sec(inode));
-	i_sblock = BFS_I(inode)->i_sblock;
-	di->i_sblock = cpu_to_le32(i_sblock);
-	di->i_eblock = cpu_to_le32(BFS_I(inode)->i_eblock);
-	di->i_eoffset = cpu_to_le32(i_sblock * BFS_BSIZE + inode->i_size - 1);
-
-	mark_buffer_dirty(bh);
-	brelse(bh);
-	mutex_unlock(&info->bfs_lock);
-	set_inode_metadata_writeback(inode);
-	return 0;
-}
-
-static int bfs_sync_inode_metadata(struct inode *inode,
-				   struct writeback_control *wbc)
-{
-	int err = 0;
-	struct bfs_inode *di;
-	struct buffer_head *bh;
-
-	di = find_inode(inode->i_sb, (u16)inode->i_ino, &bh);
-	if (IS_ERR(di))
-		return PTR_ERR(di);
-
-	sync_dirty_buffer(bh);
-	if (buffer_write_io_error(bh)) {
-		err = -EIO;
-		goto out;
-	}
-	err = mmb_sync(&BFS_I(inode)->i_metadata_bhs);
-out:
-	brelse(bh);
-	return err;
-}
-
-static void bfs_evict_inode(struct inode *inode)
-{
-	unsigned long ino = inode->i_ino;
-	struct bfs_inode *di;
-	struct buffer_head *bh;
-	struct super_block *s = inode->i_sb;
-	struct bfs_sb_info *info = BFS_SB(s);
-	struct bfs_inode_info *bi = BFS_I(inode);
-
-	dprintf("ino=%08lx\n", ino);
-
-	truncate_inode_pages_final(&inode->i_data);
-	if (inode->i_nlink)
-		mmb_sync(&BFS_I(inode)->i_metadata_bhs);
-	mmb_invalidate(&BFS_I(inode)->i_metadata_bhs);
-	clear_inode(inode);
-
-	if (inode->i_nlink)
-		return;
-
-	di = find_inode(s, inode->i_ino, &bh);
-	if (IS_ERR(di))
-		return;
-
-	mutex_lock(&info->bfs_lock);
-	/* clear on-disk inode */
-	memset(di, 0, sizeof(struct bfs_inode));
-	mark_buffer_dirty(bh);
-	brelse(bh);
-
-	if (bi->i_dsk_ino) {
-		if (bi->i_sblock)
-			info->si_freeb += bi->i_eblock + 1 - bi->i_sblock;
-		info->si_freei++;
-		clear_bit(ino, info->si_imap);
-		bfs_dump_imap("evict_inode", s);
-	}
-
-	/*
-	 * If this was the last file, make the previous block
-	 * "last block of the last file" even if there is no
-	 * real file there, saves us 1 gap.
-	 */
-	if (info->si_lf_eblk == bi->i_eblock)
-		info->si_lf_eblk = bi->i_sblock - 1;
-	mutex_unlock(&info->bfs_lock);
-}
-
-static void bfs_put_super(struct super_block *s)
-{
-	struct bfs_sb_info *info = BFS_SB(s);
-
-	if (!info)
-		return;
-
-	mutex_destroy(&info->bfs_lock);
-	kfree(info);
-	s->s_fs_info = NULL;
-}
-
-static int bfs_statfs(struct dentry *dentry, struct kstatfs *buf)
-{
-	struct super_block *s = dentry->d_sb;
-	struct bfs_sb_info *info = BFS_SB(s);
-	u64 id = huge_encode_dev(s->s_bdev->bd_dev);
-	buf->f_type = BFS_MAGIC;
-	buf->f_bsize = s->s_blocksize;
-	buf->f_blocks = info->si_blocks;
-	buf->f_bfree = buf->f_bavail = info->si_freeb;
-	buf->f_files = info->si_lasti + 1 - BFS_ROOT_INO;
-	buf->f_ffree = info->si_freei;
-	buf->f_fsid = u64_to_fsid(id);
-	buf->f_namelen = BFS_NAMELEN;
-	return 0;
-}
-
-static struct kmem_cache *bfs_inode_cachep;
-
-static struct inode *bfs_alloc_inode(struct super_block *sb)
-{
-	struct bfs_inode_info *bi;
-	bi = alloc_inode_sb(sb, bfs_inode_cachep, GFP_KERNEL);
-	if (!bi)
-		return NULL;
-	mmb_init(&bi->i_metadata_bhs, &bi->vfs_inode.i_data);
-
-	return &bi->vfs_inode;
-}
-
-static void bfs_free_inode(struct inode *inode)
-{
-	kmem_cache_free(bfs_inode_cachep, BFS_I(inode));
-}
-
-static void init_once(void *foo)
-{
-	struct bfs_inode_info *bi = foo;
-
-	inode_init_once(&bi->vfs_inode);
-}
-
-static int __init init_inodecache(void)
-{
-	bfs_inode_cachep = kmem_cache_create("bfs_inode_cache",
-					     sizeof(struct bfs_inode_info),
-					     0, (SLAB_RECLAIM_ACCOUNT|
-						SLAB_ACCOUNT),
-					     init_once);
-	if (bfs_inode_cachep == NULL)
-		return -ENOMEM;
-	return 0;
-}
-
-static void destroy_inodecache(void)
-{
-	/*
-	 * Make sure all delayed rcu free inodes are flushed before we
-	 * destroy cache.
-	 */
-	rcu_barrier();
-	kmem_cache_destroy(bfs_inode_cachep);
-}
-
-static const struct super_operations bfs_sops = {
-	.alloc_inode	= bfs_alloc_inode,
-	.free_inode	= bfs_free_inode,
-	.write_inode	= bfs_write_inode,
-	.sync_inode_metadata = bfs_sync_inode_metadata,
-	.evict_inode	= bfs_evict_inode,
-	.put_super	= bfs_put_super,
-	.statfs		= bfs_statfs,
-};
-
-void bfs_dump_imap(const char *prefix, struct super_block *s)
-{
-#ifdef DEBUG
-	int i;
-	char *tmpbuf = kzalloc(PAGE_SIZE, GFP_KERNEL);
-
-	if (!tmpbuf)
-		return;
-	for (i = BFS_SB(s)->si_lasti; i >= 0; i--) {
-		if (i > PAGE_SIZE - 100) break;
-		if (test_bit(i, BFS_SB(s)->si_imap))
-			strcat(tmpbuf, "1");
-		else
-			strcat(tmpbuf, "0");
-	}
-	printf("%s: lasti=%08lx <%s>\n", prefix, BFS_SB(s)->si_lasti, tmpbuf);
-	kfree(tmpbuf);
-#endif
-}
-
-static int bfs_fill_super(struct super_block *s, struct fs_context *fc)
-{
-	struct buffer_head *bh, *sbh;
-	struct bfs_super_block *bfs_sb;
-	struct inode *inode;
-	unsigned i;
-	struct bfs_sb_info *info;
-	int ret = -EINVAL;
-	unsigned long i_sblock, i_eblock, i_eoff, s_size;
-	int silent = fc->sb_flags & SB_SILENT;
-
-	info = kzalloc_obj(*info);
-	if (!info)
-		return -ENOMEM;
-	mutex_init(&info->bfs_lock);
-	s->s_fs_info = info;
-	s->s_time_min = 0;
-	s->s_time_max = U32_MAX;
-
-	if (!sb_set_blocksize(s, BFS_BSIZE))
-		goto out;
-
-	sbh = sb_bread(s, 0);
-	if (!sbh)
-		goto out;
-	bfs_sb = (struct bfs_super_block *)sbh->b_data;
-	if (le32_to_cpu(bfs_sb->s_magic) != BFS_MAGIC) {
-		if (!silent)
-			printf("No BFS filesystem on %s (magic=%08x)\n", s->s_id,  le32_to_cpu(bfs_sb->s_magic));
-		goto out1;
-	}
-	if (BFS_UNCLEAN(bfs_sb, s) && !silent)
-		printf("%s is unclean, continuing\n", s->s_id);
-
-	s->s_magic = BFS_MAGIC;
-
-	if (le32_to_cpu(bfs_sb->s_start) > le32_to_cpu(bfs_sb->s_end) ||
-	    le32_to_cpu(bfs_sb->s_start) < sizeof(struct bfs_super_block) + sizeof(struct bfs_dirent)) {
-		printf("Superblock is corrupted on %s\n", s->s_id);
-		goto out1;
-	}
-
-	info->si_lasti = (le32_to_cpu(bfs_sb->s_start) - BFS_BSIZE) / sizeof(struct bfs_inode) + BFS_ROOT_INO - 1;
-	if (info->si_lasti == BFS_MAX_LASTI)
-		printf("NOTE: filesystem %s was created with 512 inodes, the real maximum is 511, mounting anyway\n", s->s_id);
-	else if (info->si_lasti > BFS_MAX_LASTI) {
-		printf("Impossible last inode number %lu > %d on %s\n", info->si_lasti, BFS_MAX_LASTI, s->s_id);
-		goto out1;
-	}
-	for (i = 0; i < BFS_ROOT_INO; i++)
-		set_bit(i, info->si_imap);
-
-	s->s_op = &bfs_sops;
-	inode = bfs_iget(s, BFS_ROOT_INO);
-	if (IS_ERR(inode)) {
-		ret = PTR_ERR(inode);
-		goto out1;
-	}
-	s->s_root = d_make_root(inode);
-	if (!s->s_root) {
-		ret = -ENOMEM;
-		goto out1;
-	}
-
-	info->si_blocks = (le32_to_cpu(bfs_sb->s_end) + 1) >> BFS_BSIZE_BITS;
-	info->si_freeb = (le32_to_cpu(bfs_sb->s_end) + 1 - le32_to_cpu(bfs_sb->s_start)) >> BFS_BSIZE_BITS;
-	info->si_freei = 0;
-	info->si_lf_eblk = 0;
-
-	/* can we read the last block? */
-	bh = sb_bread(s, info->si_blocks - 1);
-	if (!bh) {
-		printf("Last block not available on %s: %lu\n", s->s_id, info->si_blocks - 1);
-		ret = -EIO;
-		goto out2;
-	}
-	brelse(bh);
-
-	bh = NULL;
-	for (i = BFS_ROOT_INO; i <= info->si_lasti; i++) {
-		struct bfs_inode *di;
-		int block = (i - BFS_ROOT_INO) / BFS_INODES_PER_BLOCK + 1;
-		int off = (i - BFS_ROOT_INO) % BFS_INODES_PER_BLOCK;
-		unsigned long eblock;
-
-		if (!off) {
-			brelse(bh);
-			bh = sb_bread(s, block);
-		}
-
-		if (!bh)
-			continue;
-
-		di = (struct bfs_inode *)bh->b_data + off;
-
-		/* test if filesystem is not corrupted */
-
-		i_eoff = le32_to_cpu(di->i_eoffset);
-		i_sblock = le32_to_cpu(di->i_sblock);
-		i_eblock = le32_to_cpu(di->i_eblock);
-		s_size = le32_to_cpu(bfs_sb->s_end);
-
-		if (i_sblock > info->si_blocks ||
-			i_eblock > info->si_blocks ||
-			i_sblock > i_eblock ||
-			(i_eoff != le32_to_cpu(-1) && i_eoff > s_size) ||
-			i_sblock * BFS_BSIZE > i_eoff) {
-
-			printf("Inode 0x%08x corrupted on %s\n", i, s->s_id);
-
-			brelse(bh);
-			ret = -EIO;
-			goto out2;
-		}
-
-		if (!di->i_ino) {
-			info->si_freei++;
-			continue;
-		}
-		set_bit(i, info->si_imap);
-		info->si_freeb -= BFS_FILEBLOCKS(di);
-
-		eblock =  le32_to_cpu(di->i_eblock);
-		if (eblock > info->si_lf_eblk)
-			info->si_lf_eblk = eblock;
-	}
-	brelse(bh);
-	brelse(sbh);
-	bfs_dump_imap("fill_super", s);
-	return 0;
-
-out2:
-	dput(s->s_root);
-	s->s_root = NULL;
-out1:
-	brelse(sbh);
-out:
-	mutex_destroy(&info->bfs_lock);
-	kfree(info);
-	s->s_fs_info = NULL;
-	return ret;
-}
-
-static int bfs_get_tree(struct fs_context *fc)
-{
-	return get_tree_bdev(fc, bfs_fill_super);
-}
-
-static const struct fs_context_operations bfs_context_ops = {
-	.get_tree = bfs_get_tree,
-};
-
-static int bfs_init_fs_context(struct fs_context *fc)
-{
-	fc->ops = &bfs_context_ops;
-
-	return 0;
-}
-
-static struct file_system_type bfs_fs_type = {
-	.owner			= THIS_MODULE,
-	.name			= "bfs",
-	.init_fs_context	= bfs_init_fs_context,
-	.kill_sb		= kill_block_super,
-	.fs_flags		= FS_REQUIRES_DEV,
-};
-MODULE_ALIAS_FS("bfs");
-
-static int __init init_bfs_fs(void)
-{
-	int err = init_inodecache();
-	if (err)
-		goto out1;
-	err = register_filesystem(&bfs_fs_type);
-	if (err)
-		goto out;
-	return 0;
-out:
-	destroy_inodecache();
-out1:
-	return err;
-}
-
-static void __exit exit_bfs_fs(void)
-{
-	unregister_filesystem(&bfs_fs_type);
-	destroy_inodecache();
-}
-
-module_init(init_bfs_fs)
-module_exit(exit_bfs_fs)
diff --git a/tools/testing/selftests/filesystems/statmount/statmount_test.c b/tools/testing/selftests/filesystems/statmount/statmount_test.c
index 60c2c544db6a4..52544512edc75 100644
--- a/tools/testing/selftests/filesystems/statmount/statmount_test.c
+++ b/tools/testing/selftests/filesystems/statmount/statmount_test.c
@@ -17,7 +17,7 @@
 
 static const char *const known_fs[] = {
 	"9p", "adfs", "affs", "afs", "aio", "anon_inodefs", "apparmorfs",
-	"autofs", "bcachefs", "bdev", "befs", "bfs", "binder", "binfmt_misc",
+	"autofs", "bcachefs", "bdev", "befs", "binder", "binfmt_misc",
 	"bpf", "btrfs", "btrfs_test_fs", "ceph", "cgroup", "cgroup2", "cifs",
 	"coda", "configfs", "cpuset", "cramfs", "cxl", "dax", "debugfs",
 	"devpts", "devtmpfs", "dmabuf", "drm", "ecryptfs", "efivarfs", "efs",

3/2 2026/09/05 17:41 llm patch-evaluator
0m Model:
gemini-3.7-flash

Args:
null

Results:
null

Tokens:
							input: 20313
							output: 93
							thoughts: 616
						

Thoughts:
**BFS Filesystem Removal Analysis**

Okay, so this patch is a pretty straightforward one. They're ripping out the BFS filesystem from the Linux kernel completely. Let's see... looking at the changes, it's pretty thorough. We've got:

*   `CREDITS` updated with author email. Fine.
*   Documentation updated and, in some cases, deleted. That's expected for a deprecated filesystem.
*   `MAINTAINERS` updated – BFS section gone. Makes sense.
*   Arch-specific configs getting the `CONFIG_BFS_FS` option removed. Standard.
*   The `fs/Kconfig` and `fs/Makefile` files are being updated to remove any trace of BFS. Essential for a clean removal.
*   The `fs/bfs/` directory itself, the *actual filesystem code*, is gone. Everything. `Kconfig`, `Makefile`, the `.c` files, the `.h`... it's all deleted. Good.
*   The `tools/testing/selftests/filesystems/statmount/statmount_test.c` file is removing references to "bfs". Right.

So, the core of the check is: is there any executable code *left*? The answer is a resounding no. All the filesystem code is deleted. The other changes are configuration tweaks, documentation updates, and selftest cleanup. None of that is *executable* kernel code. The patch is purely destructive in terms of code presence.

Now, let's just make sure we're following the rules correctly. The negative criteria for returning `WorthFuzzing=false` says:

*   Non-kernel and non-executable changes
*   Self-tests that don't affect the compiled kernel image.
*   Build system or Kconfig changes that don't alter compiled C logic

Well, this patch nails all of those. The BFS filesystem code is *gone*. It's a complete removal, so no code is being added or modified that needs fuzzing.

Therefore, `WorthFuzzing: false`. We can enable zero configs, and there are zero focus symbols. The reasoning is clear: the patch *removes* the legacy BFS filesystem implementation, including everything associated with it: code, documentation, config entries, and selftest references. No new or modified executable kernel code remains. This is a clean sweep.

Now, let's call `set-results`.



4/2 2026/09/05 17:41 tool set-results
0m Args:
{
  "EnableConfigs": [],
  "FocusSymbols": [],
  "Reasoning": "The patch completely removes the legacy BFS (Boot File System) filesystem implementation from the kernel, along with its documentation, Kconfig entries, defconfigs, and selftest references. As only code removal, documentation, and config/selftest cleanup are performed, there is no new or modified executable code to fuzz.",
  "WorthFuzzing": false
}

Results:
{
  "EnableConfigs": null,
  "FocusSymbols": [],
  "Reasoning": "The patch completely removes the legacy BFS (Boot File System) filesystem implementation from the kernel, along with its documentation, Kconfig entries, defconfigs, and selftest references. As only code removal, documentation, and config/selftest cleanup are performed, there is no new or modified executable code to fuzz.",
  "WorthFuzzing": false
}

5/1 2026/09/05 17:41 action If
0m Args:
{
  "WorthFuzzing": false
}

Results:
null

LLM Calls Summary:
Total Calls Total Tokens Avg Tokens Total Duration (Seconds) Avg Duration (Seconds)
Tool Calls Summary:
Total Calls Total Duration (Seconds) Avg Duration (Seconds)