[lkml]   [2017]   [Sep]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
Patch in this message
Subject[PATCH 4.9 49/78] xfs: dont leak quotacheck dquots when cow recovery
4.9-stable review patch.  If anyone has any objections, please let me know.


From: "Darrick J. Wong" <>

commit 77aff8c76425c8f49b50d0b9009915066739e7d2 upstream.

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 <>
Reviewed-by: Brian Foster <>
Signed-off-by: Greg Kroah-Hartman <>
fs/xfs/xfs_mount.c | 2 ++
1 file changed, 2 insertions(+)

--- a/fs/xfs/xfs_mount.c
+++ b/fs/xfs/xfs_mount.c
@@ -1004,6 +1004,8 @@ xfs_mountfs(
xfs_reclaim_inodes(mp, SYNC_WAIT);
+ /* Clean out dquots that might be in memory after quotacheck. */
+ xfs_qm_unmount(mp);
mp->m_flags |= XFS_MOUNT_UNMOUNTING;

 \ /
  Last update: 2017-09-18 11:26    [W:0.340 / U:0.088 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site