]> www.infradead.org Git - users/jedix/linux-maple.git/commit
nilfs2: do not propagate ENOENT error from nilfs_sufile_mark_dirty()
authorRyusuke Konishi <konishi.ryusuke@gmail.com>
Wed, 21 Aug 2024 15:46:27 +0000 (00:46 +0900)
committerAndrew Morton <akpm@linux-foundation.org>
Mon, 2 Sep 2024 03:43:40 +0000 (20:43 -0700)
commitd18e4233d88b1ed95016a465ad5751629f9d70b9
tree1103084939515db33028eefcf6d45f3bbb0c4f77
parent0b9aad46c1634527c6a9f951f72c31be67f9b25c
nilfs2: do not propagate ENOENT error from nilfs_sufile_mark_dirty()

nilfs_sufile_mark_dirty(), which marks a block in the sufile metadata file
as dirty in preparation for log writing, returns -ENOENT to the caller if
the block containing the segment usage of the specified segment is
missing.

This internal code can propagate through the log writer to system calls
such as fsync.  To prevent this, treat this case as a filesystem error and
return -EIO instead.

Link: https://lkml.kernel.org/r/20240821154627.11848-6-konishi.ryusuke@gmail.com
Signed-off-by: Ryusuke Konishi <konishi.ryusuke@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
fs/nilfs2/sufile.c