aboutsummaryrefslogtreecommitdiffstats
path: root/fs/gfs2/quota.c
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2010-05-04 18:10:56 -0400
committerSteven Whitehouse <swhiteho@redhat.com>2010-05-05 04:39:55 -0400
commitad6bb90f3401556469489f237cb08626d88703d2 (patch)
tree1736b515db4b5362d381e9829914c2a8bdad6533 /fs/gfs2/quota.c
parent5e687eac1bd31baed110d239ef827d3ba666f311 (diff)
GFS2: fix quota state reporting
We need to report both the accounting and enforcing flags if we are in enforcing mode. Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
Diffstat (limited to 'fs/gfs2/quota.c')
-rw-r--r--fs/gfs2/quota.c16
1 files changed, 12 insertions, 4 deletions
diff --git a/fs/gfs2/quota.c b/fs/gfs2/quota.c
index 6dbcbad6ab17..6ca0967ce6e7 100644
--- a/fs/gfs2/quota.c
+++ b/fs/gfs2/quota.c
@@ -1418,10 +1418,18 @@ static int gfs2_quota_get_xstate(struct super_block *sb,
1418 1418
1419 memset(fqs, 0, sizeof(struct fs_quota_stat)); 1419 memset(fqs, 0, sizeof(struct fs_quota_stat));
1420 fqs->qs_version = FS_QSTAT_VERSION; 1420 fqs->qs_version = FS_QSTAT_VERSION;
1421 if (sdp->sd_args.ar_quota == GFS2_QUOTA_ON) 1421
1422 fqs->qs_flags = (XFS_QUOTA_UDQ_ENFD | XFS_QUOTA_GDQ_ENFD); 1422 switch (sdp->sd_args.ar_quota) {
1423 else if (sdp->sd_args.ar_quota == GFS2_QUOTA_ACCOUNT) 1423 case GFS2_QUOTA_ON:
1424 fqs->qs_flags = (XFS_QUOTA_UDQ_ACCT | XFS_QUOTA_GDQ_ACCT); 1424 fqs->qs_flags |= (XFS_QUOTA_UDQ_ENFD | XFS_QUOTA_GDQ_ENFD);
1425 /*FALLTHRU*/
1426 case GFS2_QUOTA_ACCOUNT:
1427 fqs->qs_flags |= (XFS_QUOTA_UDQ_ACCT | XFS_QUOTA_GDQ_ACCT);
1428 break;
1429 case GFS2_QUOTA_OFF:
1430 break;
1431 }
1432
1425 if (sdp->sd_quota_inode) { 1433 if (sdp->sd_quota_inode) {
1426 fqs->qs_uquota.qfs_ino = GFS2_I(sdp->sd_quota_inode)->i_no_addr; 1434 fqs->qs_uquota.qfs_ino = GFS2_I(sdp->sd_quota_inode)->i_no_addr;
1427 fqs->qs_uquota.qfs_nblks = sdp->sd_quota_inode->i_blocks; 1435 fqs->qs_uquota.qfs_nblks = sdp->sd_quota_inode->i_blocks;