xfs: fix frozen file system assert in xfs_trans_alloc
authorChristoph Hellwig <hch@lst.de>
Thu, 31 Jul 2025 14:19:41 +0000 (07:19 -0700)
committerCarlos Maiolino <cem@kernel.org>
Mon, 11 Aug 2025 12:03:07 +0000 (14:03 +0200)
commit647b3d59c768d7638dd17c78c8044178364383ca
tree11e89c1234a140b3da3dd87187c7c7e5e192e015
parent8f5ae30d69d7543eee0d70083daf4de8fe15d585
xfs: fix frozen file system assert in xfs_trans_alloc

Commit 83a80e95e797 ("xfs: decouple xfs_trans_alloc_empty from
xfs_trans_alloc") move the place of the assert for a frozen file system
after the sb_start_intwrite call that ensures it doesn't run on frozen
file systems, and thus allows to incorrect trigger it.

Fix that by moving it back to where it belongs.

Fixes: 83a80e95e797 ("xfs: decouple xfs_trans_alloc_empty from xfs_trans_alloc")
Reported-by: Dave Chinner <david@fromorbit.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Darrick J. Wong <djwong@kernel.org>
Signed-off-by: Carlos Maiolino <cem@kernel.org>
fs/xfs/xfs_trans.c