summaryrefslogtreecommitdiff
path: root/include/linux/timerqueue_types.h
diff options
context:
space:
mode:
authorMikhail Lobanov <m.lobanov@rosa.ru>2026-06-10 22:19:03 +0300
committerCarlos Maiolino <cem@kernel.org>2026-06-12 09:57:02 +0200
commit07e2939ddab876d68d661ebad6c4eedec98193b8 (patch)
tree1d1f7a6551ab3183599385e6b70bcce515582339 /include/linux/timerqueue_types.h
parent202ff980a464198616e53e85e5276e68c00a1031 (diff)
xfs: skip inode inactivation on a shut down mount
XFS already declines to inactivate inodes on a shut down mount, but only at queue time: xfs_inode_mark_reclaimable() calls xfs_inode_needs_inactive(), which returns false when the mount is shut down ("If the log isn't running, push inodes straight to reclaim"), and then drops the dquots and marks the inode reclaimable directly. An inode that was queued for background inactivation while the mount was still live is not covered by that check: the inodegc worker still calls xfs_inactive() on it even after the mount has been shut down in the meantime. Inactivation modifies persistent metadata and runs transactions that cannot complete on a shut down mount, and it relies on subsystems (e.g. quota) that a torn down, or never fully set up, mount may not have available. Honour the same invariant in xfs_inactive() itself: if the mount is shut down, return early before doing any inactivation work. The dquots attached to the inode are released by the existing xfs_qm_dqdetach() at the out: label, so references are not leaked, and the caller then makes the inode reclaimable exactly as before. On its own this is a consistency fix with the existing queue-time behaviour; it is also a prerequisite for shutting the mount down in the xfs_mountfs() failure path in the following patch. Fixes: ab23a7768739 ("xfs: per-cpu deferred inode inactivation queues") Signed-off-by: Mikhail Lobanov <m.lobanov@rosa.ru> Reviewed-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Carlos Maiolino <cem@kernel.org>
Diffstat (limited to 'include/linux/timerqueue_types.h')
0 files changed, 0 insertions, 0 deletions