Skip to content

Commit 2ea6f53

Browse files
Christoph HellwigSasha Levin
authored andcommitted
xfs: fix frozen file system assert in xfs_trans_alloc
commit 647b3d5 upstream. Commit 83a80e9 ("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: 83a80e9 ("xfs: decouple xfs_trans_alloc_empty from xfs_trans_alloc") Reported-by: Dave Chinner <[email protected]> Signed-off-by: Christoph Hellwig <[email protected]> Reviewed-by: Darrick J. Wong <[email protected]> Signed-off-by: Carlos Maiolino <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent 9e9ac4d commit 2ea6f53

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

fs/xfs/xfs_trans.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -284,8 +284,8 @@ xfs_trans_alloc(
284284
* by doing GFP_KERNEL allocations inside sb_start_intwrite().
285285
*/
286286
retry:
287-
WARN_ON(mp->m_super->s_writers.frozen == SB_FREEZE_COMPLETE);
288287
tp = __xfs_trans_alloc(mp, flags);
288+
WARN_ON(mp->m_super->s_writers.frozen == SB_FREEZE_COMPLETE);
289289
error = xfs_trans_reserve(tp, resp, blocks, rtextents);
290290
if (error == -ENOSPC && want_retry) {
291291
xfs_trans_cancel(tp);

0 commit comments

Comments
 (0)