aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDarrick J. Wong <darrick.wong@oracle.com>2017-08-10 17:20:29 -0400
committerDarrick J. Wong <darrick.wong@oracle.com>2017-08-17 15:40:33 -0400
commit77aff8c76425c8f49b50d0b9009915066739e7d2 (patch)
treea50370e38abe86979873fbf79c68e791c9aff0cd
parent8204f8ddaafafcae074746fcf2a05a45e6827603 (diff)
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>
-rw-r--r--fs/xfs/xfs_mount.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/fs/xfs/xfs_mount.c b/fs/xfs/xfs_mount.c
index 151a82db0945..ea7d4b4e50d0 100644
--- a/fs/xfs/xfs_mount.c
+++ b/fs/xfs/xfs_mount.c
@@ -1024,6 +1024,8 @@ xfs_mountfs(
1024 IRELE(rip); 1024 IRELE(rip);
1025 cancel_delayed_work_sync(&mp->m_reclaim_work); 1025 cancel_delayed_work_sync(&mp->m_reclaim_work);
1026 xfs_reclaim_inodes(mp, SYNC_WAIT); 1026 xfs_reclaim_inodes(mp, SYNC_WAIT);
1027 /* Clean out dquots that might be in memory after quotacheck. */
1028 xfs_qm_unmount(mp);
1027 out_log_dealloc: 1029 out_log_dealloc:
1028 mp->m_flags |= XFS_MOUNT_UNMOUNTING; 1030 mp->m_flags |= XFS_MOUNT_UNMOUNTING;
1029 xfs_log_mount_cancel(mp); 1031 xfs_log_mount_cancel(mp);