<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/git/stable/linux.git/fs/nilfs2, branch master</title>
<subtitle>Linux kernel stable tree</subtitle>
<id>https://git.rulkc.org/pub/scm/linux/kernel/git/stable/linux.git/atom?h=master</id>
<link rel='self' href='https://git.rulkc.org/pub/scm/linux/kernel/git/stable/linux.git/atom?h=master'/>
<link rel='alternate' type='text/html' href='https://git.rulkc.org/pub/scm/linux/kernel/git/stable/linux.git/'/>
<updated>2026-08-18T01:34:43+00:00</updated>
<entry>
<title>Merge tag 'nilfs2-v7.3-tag1' of git://git.kernel.org/pub/scm/linux/kernel/git/vdubeyko/nilfs2</title>
<updated>2026-08-18T01:34:43+00:00</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2026-08-18T01:34:43+00:00</published>
<link rel='alternate' type='text/html' href='https://git.rulkc.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=63c070cba0c6a586d33730ddbf63065cf28276b7'/>
<id>urn:sha1:63c070cba0c6a586d33730ddbf63065cf28276b7</id>
<content type='text'>
Pull nilfs2 updates from Viacheslav Dubeyko:
 "This contains fixes of syzbot reported issue and various fixes in
  NILFS2 functionality:

   - Reject super-root inode sizes whose computed on-disk footprint
     exceeds the filesystem block size (David Lee)

   - Replace WARN_ON() in nilfs_cpfile_delete_checkpoints() with
     returning -EIO and reporting a filesystem error via nilfs_error()
     in the case of corrupted checkpoint count on the storage medium
     (Igor Putko)

   - Fixed a potential infinite loop in nilfs_clean_segments() reported
     by syzbot (Joshua Crofts)

     In nilfs_clean_segments(), if err is non-zero, logic logs the error
     and sleeps but doesn't abort when it encounters a terminal error
     like -EROFS. This causes the thread to loop forever.

     Fix this by breaking out of the loop if nilfs_segctor_construct()
     returns -EROFS.

   - Fix small grammar mistake in the description for nilfs2 recovery
     code (Manoj K M)

   - Multiple fixes by Ryusuke Konishi:
       - fix the list corruption issue recently detected by syzbot, that
         can occur when out-of-range values are intentionally passed to
         certain GC ioctl parameters
       - fix a flaw in the original B-tree implementation related to
         truncation and resolves the reported out-of-bounds memory
         access issue
       - fix an issue reported by syzbot where a kernel BUG could be
         triggered depending on timing after filesystem corruption is
         detected
       - fix an issue where a WARN_ON check is triggered by sufile
         functions within the log writer after the filesystem degrades
         to read-only mode

   - Check for sorted keys when reading btree node blocks into the cache
     (Wang Jianjian)

     This prevents unexpected errors during the block number assignment
     phase in log writing caused by key order inconsistencies, as well
     as the kernel warnings reported by syzbot"

* tag 'nilfs2-v7.3-tag1' of git://git.kernel.org/pub/scm/linux/kernel/git/vdubeyko/nilfs2:
  nilfs2: standardize the inode number type to u64
  nilfs2: enhance btree node keys check
  nilfs2: suppress false positive WARN_ONs for sufile after an FS error
  nilfs2: fix BUG in nilfs_copy_dirty_pages() on dirty state mismatch
  nilfs2: prevent out-of-bounds read in super root block parsing
  nilfs2: fix infinite loop in nilfs_clean_segments()
  nilfs2: fix slab-out-of-bounds in nilfs_direct_propagate after truncation
  Documentation: fix grammar in description of nilfs2 recovery code
  nilfs2: handle corrupted checkpoint count gracefully during deletion
  nilfs2: reject invalid block index in GC ioctl
</content>
</entry>
<entry>
<title>Merge tag 'vfs-7.3-rc1.misc' of git://git.kernel.org/pub/scm/linux/kernel/git/vfs/vfs</title>
<updated>2026-08-17T19:56:12+00:00</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2026-08-17T19:56:12+00:00</published>
<link rel='alternate' type='text/html' href='https://git.rulkc.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=1c3e8cef79ea5f1415cff0d3c507e2e07b71ade8'/>
<id>urn:sha1:1c3e8cef79ea5f1415cff0d3c507e2e07b71ade8</id>
<content type='text'>
Pull misc vfs updates from Christian Brauner:
 "Bigger cleanups:

   - The lockref dead-count handling is tidied up.

     The open-coded check for a count below zero as the dead marker
     relies on information the caller should not have.

   - make put_mnt_ns() leave mounts connected. Destroying a mount
     namespace disconnected its mounts from their mount points. So a
     file descriptor still open on the parent of a mount point could be
     used to peek under it.

     Locked mounts were already kept connected to prevent exactly that.
     But a mount is only locked when its tree is copied across a user
     namespace boundary. So a mount namespace set up by a privileged
     component had no locked mounts and its mounts were disconnected.
     Passing UMOUNT_CONNECTED keeps every mount connected and prevents
     that bug.

   - vfs_prepare_mode() passes S_IFDIR for directories. I meant to fix
     that ago but didn't get to it. So now someone finally did it.

     This kills the exception where the mode could be 0 when a directory
     was created whereas every other creation operation passed it
     explicitly already.

   - move long delayed work for ufs, jffs2, hfsplus, hfs and affs from
     the per-cpu system_long_wq to the new unbound system_dfl_long_wq.

     None of that work relies on per-cpu state and the work item is
     enqueued with queue_delayed_work() whose timer is global anyway. So
     it may as well benefit from scheduler task placement.

  Smaller fixes and cleanups:

   - unlock_buffer() and journal_end_buffer_io_sync() use
     clear_and_wake_up_bit()

   - the pipe page pools are unified into a single per-pipe pool and the
     extra wake_up(rd_wait) is limited to EPOLLET consumers

   - eventpoll now computes its timer slack lazily in ep_poll()

   - shrink_dcache_for_umount() keeps making progress on busy roots

   - excess xarray nodes are freed in clear_inode()

   - romfs detects hard link cycles

   - the user path of nested backing files is fixed

   - pidfd holds exec_update_lock around the namespace ioctl

   - non-memcg-aware nr_cached_objects is skipped during memcg slab
     shrink

   - iomap_write_iter() always returns status

   - mangle_path() is renamed to seq_mangle_path()

   - inode timestamp accessors are annotated

   - new regression test for pipe-&gt;poll_usage.

   - a few documentation, kernel-doc and selftest fixes"

* tag 'vfs-7.3-rc1.misc' of git://git.kernel.org/pub/scm/linux/kernel/git/vfs/vfs: (67 commits)
  selftests/namespaces: Fix racy pipe handshake in timens and pidns_separate
  selftests/epoll: add a regression test for pipe-&gt;poll_usage
  pipe: only enable the extra wake_up(rd_wait) for EPOLLET consumers
  pidfd: hold exec_update_lock around namespace ioctl
  fs: fix user path of nested backing files
  fs: remove stale inode_insert5() kernel-doc parameter
  fs: fix switch/case indentation in sysfs() syscall
  fs: document semantics of kstat::{uid,gid} fields
  dcache: keep shrink_dcache_for_umount() making progress on busy roots
  seq_file: rename mangle_path to seq_mangle_path
  nstree: add/fix struct ns_id_req kernel-doc member fields
  dcache: use lockref routines for dead count checks
  lockref: tidy up dead count handling
  initramfs: fix typo in reserve_initrd_mem comment
  fs/pipe: unify the page pools into a single per-pipe pool
  fs: annotate inode timestamp accessors
  eventpoll: compute timer slack lazily in ep_poll()
  selftests/filesystems: add mntns cleanup test
  put_mnt_ns(): leave mounts connected
  affs: Move long delayed work on system_dfl_long_wq
  ...
</content>
</entry>
<entry>
<title>nilfs2: standardize the inode number type to u64</title>
<updated>2026-08-10T23:06:23+00:00</updated>
<author>
<name>Ryusuke Konishi</name>
<email>konishi.ryusuke@gmail.com</email>
</author>
<published>2026-08-10T17:48:18+00:00</published>
<link rel='alternate' type='text/html' href='https://git.rulkc.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=24a098541a765ed017274f8094004404a83b0daf'/>
<id>urn:sha1:24a098541a765ed017274f8094004404a83b0daf</id>
<content type='text'>
Variables handling inode numbers - such as the 'i_ino' member of the
inode structure - have been converted to 'u64' within the kernel to
ensure consistency.  However, some parts of the nilfs2 implementation
still use 'ino_t' or 'unsigned long' - both of which are
architecture-dependent types - to handle inode numbers.

Replace those remaining instances of 'ino_t' or 'unsigned long' with
'u64'.

Signed-off-by: Ryusuke Konishi &lt;konishi.ryusuke@gmail.com&gt;
Signed-off-by: Viacheslav Dubeyko &lt;slava@dubeyko.com&gt;
</content>
</entry>
<entry>
<title>nilfs2: enhance btree node keys check</title>
<updated>2026-08-10T23:02:25+00:00</updated>
<author>
<name>Wang Jianjian</name>
<email>wangjianjian3@huawei.com</email>
</author>
<published>2026-08-10T14:20:52+00:00</published>
<link rel='alternate' type='text/html' href='https://git.rulkc.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=d7d54599a132408ee8ce857393974dddfb88357c'/>
<id>urn:sha1:d7d54599a132408ee8ce857393974dddfb88357c</id>
<content type='text'>
syzbot reported a warning on nilfs_btree_assign:
WARNING: fs/nilfs2/btree.c:2302 at nilfs_btree_assign+0x983/0xbe0 fs/nilfs2/btree.c:2302,

Analysis found that a corrupted file has the following btree layout:
Level2(key/ptr): [ 256/15 ]
Level1(key/ptr): [ 0/8, 1/9, 0/10, 3/11, 4/12, 5/13, 6/14,
                   139637976727559/16, 0/17 ]

The test truncated the file to 2 bytes, which partially zeroes the first
block and adds the file to the dirty list. When the segment constructor
writes it and assigns a new blocknr for the index block, it searches the
btree with key=0 and min level=2, and apparently returns -ENOENT.

Therefore, we should perform more checks on the btree nodes and return
early.

[ryusuke: split long lines in btree.c to satisfy checkpatch and
 improved the error message format for clarity]

Reported-by: syzbot+158be45e4d99232e1900@syzkaller.appspotmail.com
Closes: https://syzkaller.appspot.com/bug?extid=158be45e4d99232e1900
Signed-off-by: Wang Jianjian &lt;wangjianjian3@huawei.com&gt;
Fixes: 17c76b0104e4 ("nilfs2: B-tree based block mapping")
Cc: stable+noautosel@kernel.org # Warning suppression primarily
Signed-off-by: Ryusuke Konishi &lt;konishi.ryusuke@gmail.com&gt;
Signed-off-by: Viacheslav Dubeyko &lt;slava@dubeyko.com&gt;
</content>
</entry>
<entry>
<title>nilfs2: suppress false positive WARN_ONs for sufile after an FS error</title>
<updated>2026-08-07T17:12:39+00:00</updated>
<author>
<name>Ryusuke Konishi</name>
<email>konishi.ryusuke@gmail.com</email>
</author>
<published>2026-08-06T18:13:39+00:00</published>
<link rel='alternate' type='text/html' href='https://git.rulkc.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=6b38b82be46b242a64db8b3efc33cd15565efd08'/>
<id>urn:sha1:6b38b82be46b242a64db8b3efc33cd15565efd08</id>
<content type='text'>
After applying the commit associated with the Fixes tag, metadata file
buffers can be evicted from memory even after being marked dirty.

Consequently, operations such as rolling back sufile changes upon
error - which modify the buffer and were previously assumed incapable
of failure - can now fail.

This behavior causes syzbot to trigger a WARN_ON check immediately
following sufile function calls within the log writer.

Resolve this issue by introducing a macro, nilfs_sufile_warn_on_error(),
which uses WARN_ONCE to report unexpected errors only when the filesystem
has not degraded to read-only mode, returning -EIO or -EROFS accordingly.
Replace existing WARN_ON checks for unexpected errors following sufile
operations with this new macro.

Additionally, for nilfs_segctor_truncate_segments() - where an error must
be propagated to halt log writing if a sufile operation fails - modify
the function to return the error code appropriately.

Reported-by: syzbot+5957361606d7b750b874@syzkaller.appspotmail.com
Closes: https://syzkaller.appspot.com/bug?extid=5957361606d7b750b874
Fixes: 8c26c4e2694a ("nilfs2: fix issue with flush kernel thread after remount in RO mode because of driver's internal error or metadata corruption")
Cc: stable+noautosel@kernel.org # Warning suppression primarily; will request backport individually if needed
Signed-off-by: Ryusuke Konishi &lt;konishi.ryusuke@gmail.com&gt;
Signed-off-by: Viacheslav Dubeyko &lt;slava@dubeyko.com&gt;
</content>
</entry>
<entry>
<title>Remove excl arg to -&gt;create inode_operation</title>
<updated>2026-07-31T08:18:30+00:00</updated>
<author>
<name>NeilBrown</name>
<email>neil@brown.name</email>
</author>
<published>2026-07-01T11:51:55+00:00</published>
<link rel='alternate' type='text/html' href='https://git.rulkc.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=b2f1e6301efa4a80becdb0715416c3cbc693fbb4'/>
<id>urn:sha1:b2f1e6301efa4a80becdb0715416c3cbc693fbb4</id>
<content type='text'>
The only time that 'false' is passed as the 'excl' arg to the -&gt;create
inode_operation is in lookup_open() when -&gt;atomic_open is not provided
by the parent directory.
*all* directory inode_operations which do not have -&gt;atomic_open
completely ignore the 'excl' arg.

Therefore we don't need the 'excl' arg.  Those few -&gt;create operations
which pay attention to the arg are only ever called with a value of
'true'.

We remove that arg and change all -&gt;create operations to behave as those
thhe arg were 'true'.

Signed-off-by: NeilBrown &lt;neil@brown.name&gt;
Link: https://patch.msgid.link/178290671516.27465.15984496764174914338@noble.neil.brown.name
Reviewed-by: Jori Koolstra &lt;jkoolstra@xs4all.nl&gt;
Reviewed-by: Jan Kara &lt;jack@suse.cz&gt;
Signed-off-by: Christian Brauner (Amutable) &lt;brauner@kernel.org&gt;
</content>
</entry>
<entry>
<title>nilfs2: fix BUG in nilfs_copy_dirty_pages() on dirty state mismatch</title>
<updated>2026-07-28T23:54:00+00:00</updated>
<author>
<name>Ryusuke Konishi</name>
<email>konishi.ryusuke@gmail.com</email>
</author>
<published>2026-07-20T14:16:52+00:00</published>
<link rel='alternate' type='text/html' href='https://git.rulkc.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=66f4ad3ce158902e5f98afea93189972ed8750c2'/>
<id>urn:sha1:66f4ad3ce158902e5f98afea93189972ed8750c2</id>
<content type='text'>
Syzbot reported a kernel BUG triggered within nilfs_copy_dirty_pages(),
which copies dirty DAT file folios/pages to its shadow page cache.  The
BUG occurs when a retrieved dirty folio/page unexpectedly loses its
'dirty' status.

This issue arises because, since the commit referenced below, the 'dirty'
flag of a folio/page can be cleared asynchronously after the filesystem
detects metadata corruption and transitions to read-only mode.

Resolve the issue by returning an -EROFS error if the filesystem has
transitioned to read-only mode.  Also change the behavior to issue a
kernel warning only once instead of triggering a kernel BUG when this
unexpected 'dirty' state is detected while the filesystem is not in
read-only mode.

Reported-by: syzbot+8baf9a79a3ffc6271cb6@syzkaller.appspotmail.com
Closes: https://syzkaller.appspot.com/bug?extid=8baf9a79a3ffc6271cb6
Fixes: 8c26c4e2694a ("nilfs2: fix issue with flush kernel thread after remount in RO mode because of driver's internal error or metadata corruption")
Signed-off-by: Ryusuke Konishi &lt;konishi.ryusuke@gmail.com&gt;
Signed-off-by: Viacheslav Dubeyko &lt;slava@dubeyko.com&gt;
</content>
</entry>
<entry>
<title>nilfs2: prevent out-of-bounds read in super root block parsing</title>
<updated>2026-07-28T23:46:37+00:00</updated>
<author>
<name>David Lee</name>
<email>david.lee@trailofbits.com</email>
</author>
<published>2026-07-17T16:56:21+00:00</published>
<link rel='alternate' type='text/html' href='https://git.rulkc.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=7cb2f76a6a2ba2130b577cb8ac13e1e46c4fc689'/>
<id>urn:sha1:7cb2f76a6a2ba2130b577cb8ac13e1e46c4fc689</id>
<content type='text'>
super-root inode metadata size is trusted before nilfs_read_inode_common().

Reject super-root inode sizes whose computed on-disk footprint exceeds the
filesystem block size. This prevents malformed filesystem images from
making nilfs_read_inode_common() read past the end of the super-root block.

[ryusuke: clarify the commit title]

Fixes: 8a9d2191e9f4 ("nilfs2: operations for the_nilfs core object")
Signed-off-by: David Lee &lt;david.lee@trailofbits.com&gt;
Assisted-by: Codex:gpt-5.5
Signed-off-by: Ryusuke Konishi &lt;konishi.ryusuke@gmail.com&gt;
Signed-off-by: Viacheslav Dubeyko &lt;slava@dubeyko.com&gt;
</content>
</entry>
<entry>
<title>nilfs2: fix infinite loop in nilfs_clean_segments()</title>
<updated>2026-07-28T23:39:45+00:00</updated>
<author>
<name>Joshua Crofts</name>
<email>joshua.crofts1@gmail.com</email>
</author>
<published>2026-07-17T10:58:54+00:00</published>
<link rel='alternate' type='text/html' href='https://git.rulkc.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=ce5a5ad1a8330a2fcfdd9ec2ab341be739e89a18'/>
<id>urn:sha1:ce5a5ad1a8330a2fcfdd9ec2ab341be739e89a18</id>
<content type='text'>
syzbot reported a hung task in nilfs_transaction_begin(). This occurs
because the cleaner ioctl falls into an infinite loop if
nilfs_segctor_construct() repeatedly returns -EROFS (e.g. the device
is remounted as read-only after an I/O error).

Currently in nilfs_clean_segments(), if err is non-zero, it logs the
error and sleeps but doesn't abort when it encounters a terminal error
like -EROFS. This causes the thread to loop forever.

Fix this by breaking out of the loop if nilfs_segctor_construct()
returns -EROFS. This matches the behaviour in
nilfs_segctor_write_out(), which also handles -EROFS.

Reported-by: syzbot+cae54346a70bbceeff2c@syzkaller.appspotmail.com
Closes: https://syzkaller.appspot.com/bug?extid=cae54346a70bbceeff2c
Fixes: 9ff05123e3bf ("nilfs2: segment constructor")
Assisted-by: gemini:gemini-3.1-pro
Signed-off-by: Joshua Crofts &lt;joshua.crofts1@gmail.com&gt;
Acked-by: Ryusuke Konishi &lt;konishi.ryusuke@gmail.com&gt;
Signed-off-by: Viacheslav Dubeyko &lt;slava@dubeyko.com&gt;
</content>
</entry>
<entry>
<title>nilfs2: fix slab-out-of-bounds in nilfs_direct_propagate after truncation</title>
<updated>2026-07-28T23:33:03+00:00</updated>
<author>
<name>Ryusuke Konishi</name>
<email>konishi.ryusuke@gmail.com</email>
</author>
<published>2026-07-17T04:39:43+00:00</published>
<link rel='alternate' type='text/html' href='https://git.rulkc.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=45662dedb8f272ef7f16e69f13424c4bd0399240'/>
<id>urn:sha1:45662dedb8f272ef7f16e69f13424c4bd0399240</id>
<content type='text'>
Shuangpeng Bai reported that KASAN detected a slab-out-of-bounds error
in nilfs_direct_propagate() during testing.

Analysis revealed that after truncating a file, a node block immediately
below the B-tree root was not deleted.  Instead, it remained in the B-tree
node cache in a dirty state.  The log writer subsequently detected this
block and incorrectly invoked nilfs_direct_propagate() on it, which is
designed to handle only data blocks in direct mapping.

B-tree nodes in the cache are managed by virtual block numbers, and their
logical keys typically exceed the range expected by direct mapping.
Consequently, processing such a node as a direct mapping entry triggers
a slab-out-of-bounds access.

The root cause is that when a B-tree mapping collapses into a direct
mapping during truncation, an intermediate node block pointed to by the
root node is left behind as garbage instead of being explicitly deleted.

This resolves the issue by adding a nilfs_btree_discard() operation
to delete the remaining intermediate node block during the conversion.
A 'deform' flag is added to the bop_delete interface to explicitly signal
that the deletion is part of a mapping transformation.  This allows the
B-tree mapping implementation to perform the necessary cleanup and
discarding of the residual node structure that would be otherwise be left
orphaned after the transition.

Reported-by: Shuangpeng Bai &lt;shuangpeng.kernel@gmail.com&gt;
Closes: https://lore.kernel.org/r/08A3603A-ADB6-484C-9015-9AC1340E6FB8@gmail.com
Fixes: 36a580eb489f ("nilfs2: direct block mapping")
Cc: stable@vger.kernel.org
Signed-off-by: Ryusuke Konishi &lt;konishi.ryusuke@gmail.com&gt;
Signed-off-by: Viacheslav Dubeyko &lt;slava@dubeyko.com&gt;
</content>
</entry>
</feed>
