xfs
[Top] [All Lists]

Review: Fix dbflush panic in xfs_qm_sync

To: xfs-oss <xfs@xxxxxxxxxxx>
Subject: Review: Fix dbflush panic in xfs_qm_sync
From: Donald Douwsma <donaldd@xxxxxxx>
Date: Tue, 16 Oct 2007 09:29:23 +1000
Sender: xfs-bounce@xxxxxxxxxxx
User-agent: Thunderbird 2.0.0.6 (Macintosh/20070728)
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()


Signed-off-by: Donald Douwsma <donaldd@xxxxxxx>

--- 2.6.x-xfs.orig/fs/xfs/quota/xfs_qm.c
+++ 2.6.x-xfs/fs/xfs/quota/xfs_qm.c
@@ -1007,6 +1007,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.


<Prev in Thread] Current Thread [Next in Thread>