Skip to content

Commit 77aff8c

Browse files
committed
xfs: don't leak quotacheck dquots when cow recovery
If we fail a mount on account of cow recovery errors, it's possible that a previous quotacheck left some dquots in memory. The bailout clause of xfs_mountfs forgets to purge these, and so we leak them. Fix that. Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com> Reviewed-by: Brian Foster <bfoster@redhat.com>
1 parent 8204f8d commit 77aff8c

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

fs/xfs/xfs_mount.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1024,6 +1024,8 @@ xfs_mountfs(
10241024
IRELE(rip);
10251025
cancel_delayed_work_sync(&mp->m_reclaim_work);
10261026
xfs_reclaim_inodes(mp, SYNC_WAIT);
1027+
/* Clean out dquots that might be in memory after quotacheck. */
1028+
xfs_qm_unmount(mp);
10271029
out_log_dealloc:
10281030
mp->m_flags |= XFS_MOUNT_UNMOUNTING;
10291031
xfs_log_mount_cancel(mp);

0 commit comments

Comments
 (0)