From: Donald Douwsma Date: Fri, 23 Nov 2007 05:27:42 +0000 (+1100) Subject: [XFS] Fix dbflush panic in xfs_qm_sync. X-Git-Tag: v2.6.24-rc5~19^2~7 X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=d757762bf2f6aea954745c76b4d767067b85be9d;p=linux-2.6-omap-h63xx.git [XFS] Fix dbflush panic in xfs_qm_sync. The recent behaviour layer removal dropped the check for quotas that have been requested at mount time but have subsequently been turned off. This results in a panic when accessing m_quotainfo which has been freed. This patch adds the check originally made by xfs_qm_syncall() to xfs_qm_sync(). SGI-PV: 969769 SGI-Modid: xfs-linux-melb:xfs-kern:29908a Signed-off-by: Donald Douwsma Signed-off-by: David Chinner Signed-off-by: Lachlan McIlroy --- diff --git a/fs/xfs/quota/xfs_qm.c b/fs/xfs/quota/xfs_qm.c index b5f91281b70..d488645f833 100644 --- a/fs/xfs/quota/xfs_qm.c +++ b/fs/xfs/quota/xfs_qm.c @@ -1008,6 +1008,9 @@ xfs_qm_sync( boolean_t nowait; int error; + if (! XFS_IS_QUOTA_ON(mp)) + return 0; + restarts = 0; /* * We won't block unless we are asked to.