]> git.ipfire.org Git - thirdparty/e2fsprogs.git/commit
e2fsck: fix logic bug when there are no references to an EA inode
authorTheodore Ts'o <tytso@mit.edu>
Mon, 17 Mar 2025 14:38:44 +0000 (10:38 -0400)
committerTheodore Ts'o <tytso@mit.edu>
Mon, 9 Jun 2025 19:54:33 +0000 (15:54 -0400)
commit1e07832f9fa40a727892e4a0de690bc0d1c80377
tree1e8de10a6a4720cde8cbdf8d35b790abd08ba8f7
parentf74bbfdaa3a5c709c3c90a94adaff8411f9042fd
e2fsck: fix logic bug when there are no references to an EA inode

There was a boolean logic error which, among other things, could cause
an attempt to modify an inode in e2fsck -n mode:

e2fsck 1.47.2 (1-Jan-2025)
Pass 1: Checking inodes, blocks, and sizes
Pass 2: Checking directory structure
Pass 3: Checking directory connectivity
Pass 4: Checking reference counts
ext2fs_write_inode: Attempt to write to filesystem opened read-only while writing inode 14 in pass4
e2fsck: aborted

Fixes: 849a9e6e133a ("e2fsck: add more checks for ea inode consistency")
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
(cherry picked from commit 92b6e93936d7a0f6d7ce7a9f142e2c0ee9afbeaf)
e2fsck/pass4.c