From: Jie Liu Date: Thu, 12 Apr 2012 03:59:57 +0000 (+0000) Subject: xfs: don't fill statvfs with project quota for a directory if it was not enabled. X-Git-Tag: v3.5-rc1~91^2~55 X-Git-Url: https://openfabrics.org/gitweb/?a=commitdiff_plain;h=da5bf95e3cdca348327c82568c2860229c0daaa2;p=~emulex%2Finfiniband.git xfs: don't fill statvfs with project quota for a directory if it was not enabled. Check if the project quota is running or not before performing xfs_qm_statvfs(), just return if not. Otherwise the ASSERT XFS_IS_QUOTA_RUNNING in xfs_qm_dqget will be popped. Signed-off-by: Jie Liu Signed-off-by: Ben Myers --- diff --git a/fs/xfs/xfs_super.c b/fs/xfs/xfs_super.c index dab9a5f6dfd..93f7a3f750d 100644 --- a/fs/xfs/xfs_super.c +++ b/fs/xfs/xfs_super.c @@ -1072,7 +1072,7 @@ xfs_fs_statfs( spin_unlock(&mp->m_sb_lock); - if ((ip->i_d.di_flags & XFS_DIFLAG_PROJINHERIT) || + if ((ip->i_d.di_flags & XFS_DIFLAG_PROJINHERIT) && ((mp->m_qflags & (XFS_PQUOTA_ACCT|XFS_OQUOTA_ENFD))) == (XFS_PQUOTA_ACCT|XFS_OQUOTA_ENFD)) xfs_qm_statvfs(ip, statp);