Skip to content

Commit c8c7521

Browse files
Christoph Hellwiggregkh
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 <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> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent e69d24d commit c8c7521

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)