summaryrefslogtreecommitdiffstats
path: root/fs/xfs
diff options
context:
space:
mode:
authorDarrick J. Wong <darrick.wong@oracle.com>2017-08-10 14:20:29 -0700
committerDarrick J. Wong <darrick.wong@oracle.com>2017-08-17 12:40:33 -0700
commit77aff8c76425c8f49b50d0b9009915066739e7d2 (patch)
treea50370e38abe86979873fbf79c68e791c9aff0cd /fs/xfs
parent8204f8ddaafafcae074746fcf2a05a45e6827603 (diff)
downloadblackbird-obmc-linux-77aff8c76425c8f49b50d0b9009915066739e7d2.tar.gz
blackbird-obmc-linux-77aff8c76425c8f49b50d0b9009915066739e7d2.zip
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>
Diffstat (limited to 'fs/xfs')
-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(
IRELE(rip);
cancel_delayed_work_sync(&mp->m_reclaim_work);
xfs_reclaim_inodes(mp, SYNC_WAIT);
+ /* Clean out dquots that might be in memory after quotacheck. */
+ xfs_qm_unmount(mp);
out_log_dealloc:
mp->m_flags |= XFS_MOUNT_UNMOUNTING;
xfs_log_mount_cancel(mp);
OpenPOWER on IntegriCloud