diff options
| author | Christoph Hellwig <[email protected]> | 2025-07-31 14:19:41 +0000 |
|---|---|---|
| committer | Carlos Maiolino <[email protected]> | 2025-08-11 12:03:07 +0000 |
| commit | 647b3d59c768d7638dd17c78c8044178364383ca (patch) | |
| tree | 11e89c1234a140b3da3dd87187c7c7e5e192e015 | |
| parent | Linux 6.17-rc1 (diff) | |
| download | kernel-647b3d59c768d7638dd17c78c8044178364383ca.tar.gz kernel-647b3d59c768d7638dd17c78c8044178364383ca.zip | |
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 <[email protected]>
Signed-off-by: Christoph Hellwig <[email protected]>
Reviewed-by: Darrick J. Wong <[email protected]>
Signed-off-by: Carlos Maiolino <[email protected]>
| -rw-r--r-- | fs/xfs/xfs_trans.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/xfs/xfs_trans.c b/fs/xfs/xfs_trans.c index ece374d622b3..575e7028f423 100644 --- a/fs/xfs/xfs_trans.c +++ b/fs/xfs/xfs_trans.c @@ -253,8 +253,8 @@ xfs_trans_alloc( * by doing GFP_KERNEL allocations inside sb_start_intwrite(). */ retry: - WARN_ON(mp->m_super->s_writers.frozen == SB_FREEZE_COMPLETE); tp = __xfs_trans_alloc(mp, flags); + WARN_ON(mp->m_super->s_writers.frozen == SB_FREEZE_COMPLETE); error = xfs_trans_reserve(tp, resp, blocks, rtextents); if (error == -ENOSPC && want_retry) { xfs_trans_cancel(tp); |
