xfs: don't leak quotacheck dquots when cow recovery
authorDarrick J. Wong <darrick.wong@oracle.com>
Sun, 17 Sep 2017 21:06:44 +0000 (14:06 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 20 Sep 2017 06:19:59 +0000 (08:19 +0200)
commite1a7b7e1f6c294f64602b9cb1c15d44432f48561
tree90f06647418200b66338585854b4f92a44af0130
parent7fb3e5e373bb45342c6909ea8320010c461b4082
xfs: don't leak quotacheck dquots when cow recovery

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