Skip to content

Commit

Permalink
xfs: don't fill statvfs with project quota for a directory if it was …
Browse files Browse the repository at this point in the history
…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 <jeff.liu@oracle.com>
Signed-off-by: Ben Myers <bpm@sgi.com>
  • Loading branch information
Jie Liu authored and Ben Myers committed Apr 16, 2012
1 parent 18caa67 commit da5bf95
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion fs/xfs/xfs_super.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit da5bf95

Please sign in to comment.