Skip to content

Commit 647b3d5

Browse files
Christoph Hellwigcmaiolino
authored andcommitted
xfs: fix frozen file system assert in xfs_trans_alloc
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]>
1 parent 8f5ae30 commit 647b3d5

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
@@ -253,8 +253,8 @@ xfs_trans_alloc(
253253
* by doing GFP_KERNEL allocations inside sb_start_intwrite().
254254
*/
255255
retry:
256-
WARN_ON(mp->m_super->s_writers.frozen == SB_FREEZE_COMPLETE);
257256
tp = __xfs_trans_alloc(mp, flags);
257+
WARN_ON(mp->m_super->s_writers.frozen == SB_FREEZE_COMPLETE);
258258
error = xfs_trans_reserve(tp, resp, blocks, rtextents);
259259
if (error == -ENOSPC && want_retry) {
260260
xfs_trans_cancel(tp);

0 commit comments

Comments
 (0)