[PATCH] xfs: don't fill statvfs with project quota for a directory if it was not enabled.
sn0wing at sina.com
sn0wing at sina.com
Wed Apr 11 22:59:57 CDT 2012
Hi Christoph,
I am Jeff Liu, I cannot connect to my Oracle email box, looks it was blocked by the stupid china firewall today. :(
> - 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);
> I thjink the correct fix here is to replace the || between the inode
> flag and quota flag check with and && - we want both the above
> conditions to be true.
Thanks!
> Can you respin the patch by doing that and make
> sure it still passes the test case? I'd like to send it of to -stable
> ASAP.
It works with your comments, the revised was shown as following:
Signed-off-by: Jie Liu <jeff.liu at oracle.com>
---
fs/xfs/xfs_super.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/fs/xfs/xfs_super.c b/fs/xfs/xfs_super.c
index ee5b695..e3871d5 100644
--- a/fs/xfs/xfs_super.c
+++ b/fs/xfs/xfs_super.c
@@ -1059,7 +1059,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);
--
1.7.9
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://oss.sgi.com/pipermail/xfs/attachments/20120412/9e9dfdaf/attachment-0001.htm>
More information about the xfs
mailing list