]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
xfs: allow inode inactivation during a ro mount log recovery
authorDarrick J. Wong <djwong@kernel.org>
Tue, 17 Jun 2025 20:55:33 +0000 (22:55 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 27 Jun 2025 10:05:22 +0000 (11:05 +0100)
commit4ad892bdacb61323423bf09d22d7f5ccf4df3830
tree6abedcd733566aa0e5f4c6d9de26cdfa579e6911
parent7eac413a3ea3893916b67dbc4c7482d8c75ebe8f
xfs: allow inode inactivation during a ro mount log recovery

[ Upstream commit 76e589013fec672c3587d6314f2d1f0aeddc26d9 ]

In the next patch, we're going to prohibit log recovery if the primary
superblock contains an unrecognized rocompat feature bit even on
readonly mounts.  This requires removing all the code in the log
mounting process that temporarily disables the readonly state.

Unfortunately, inode inactivation disables itself on readonly mounts.
Clearing the iunlinked lists after log recovery needs inactivation to
run to free the unreferenced inodes, which (AFAICT) is the only reason
why log mounting plays games with the readonly state in the first place.

Therefore, change the inactivation predicates to allow inactivation
during log recovery of a readonly mount.

Signed-off-by: Darrick J. Wong <djwong@kernel.org>
Reviewed-by: Dave Chinner <dchinner@redhat.com>
Stable-dep-of: 74ad4693b647 ("xfs: fix log recovery when unknown rocompat bits are set")
Signed-off-by: Amir Goldstein <amir73il@gmail.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
fs/xfs/xfs_inode.c