提交 ad6bb90f 编写于 作者: C Christoph Hellwig 提交者: Steven Whitehouse

GFS2: fix quota state reporting

We need to report both the accounting and enforcing flags if we are
in enforcing mode.
Signed-off-by: NChristoph Hellwig <hch@lst.de>
Signed-off-by: NSteven Whitehouse <swhiteho@redhat.com>
上级 5e687eac
......@@ -1418,10 +1418,18 @@ static int gfs2_quota_get_xstate(struct super_block *sb,
memset(fqs, 0, sizeof(struct fs_quota_stat));
fqs->qs_version = FS_QSTAT_VERSION;
if (sdp->sd_args.ar_quota == GFS2_QUOTA_ON)
fqs->qs_flags = (XFS_QUOTA_UDQ_ENFD | XFS_QUOTA_GDQ_ENFD);
else if (sdp->sd_args.ar_quota == GFS2_QUOTA_ACCOUNT)
fqs->qs_flags = (XFS_QUOTA_UDQ_ACCT | XFS_QUOTA_GDQ_ACCT);
switch (sdp->sd_args.ar_quota) {
case GFS2_QUOTA_ON:
fqs->qs_flags |= (XFS_QUOTA_UDQ_ENFD | XFS_QUOTA_GDQ_ENFD);
/*FALLTHRU*/
case GFS2_QUOTA_ACCOUNT:
fqs->qs_flags |= (XFS_QUOTA_UDQ_ACCT | XFS_QUOTA_GDQ_ACCT);
break;
case GFS2_QUOTA_OFF:
break;
}
if (sdp->sd_quota_inode) {
fqs->qs_uquota.qfs_ino = GFS2_I(sdp->sd_quota_inode)->i_no_addr;
fqs->qs_uquota.qfs_nblks = sdp->sd_quota_inode->i_blocks;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册