Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1733895 > unrolled thread

[PATCH 4.9 49/78] xfs: dont leak quotacheck dquots when cow recovery

Started byGreg Kroah-Hartman <gregkh@linuxfoundation.org>
First post2017-09-18 11:30 +0200
Last post2017-09-18 11:30 +0200
Articles 1 — 1 participant

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  [PATCH 4.9 49/78] xfs: dont leak quotacheck dquots when cow recovery Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2017-09-18 11:30 +0200

#1733895 — [PATCH 4.9 49/78] xfs: dont leak quotacheck dquots when cow recovery

FromGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Date2017-09-18 11:30 +0200
Subject[PATCH 4.9 49/78] xfs: dont leak quotacheck dquots when cow recovery
Message-ID<ur0xl-4fK-61@gated-at.bofh.it>
4.9-stable review patch.  If anyone has any objections, please let me know.

------------------

From: "Darrick J. Wong" <darrick.wong@oracle.com>

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 <darrick.wong@oracle.com>
Reviewed-by: Brian Foster <bfoster@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
 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(
 	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);

[toc] | [standalone]


Back to top | Article view | linux.kernel


csiph-web