Skip to content

Commit 237d788

Browse files
kaixuxiakxdjwong
authored andcommitted
xfs: show the proper user quota options
The quota option 'usrquota' should be shown if both the XFS_UQUOTA_ACCT and XFS_UQUOTA_ENFD flags are set. The option 'uqnoenforce' should be shown when only the XFS_UQUOTA_ACCT flag is set. The current code logic seems wrong, Fix it and show proper options. Signed-off-by: Kaixu Xia <kaixuxia@tencent.com> Reviewed-by: Darrick J. Wong <darrick.wong@oracle.com> Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
1 parent afbd914 commit 237d788

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

fs/xfs/xfs_super.c

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -199,10 +199,12 @@ xfs_fs_show_options(
199199
seq_printf(m, ",swidth=%d",
200200
(int)XFS_FSB_TO_BB(mp, mp->m_swidth));
201201

202-
if (mp->m_qflags & (XFS_UQUOTA_ACCT|XFS_UQUOTA_ENFD))
203-
seq_puts(m, ",usrquota");
204-
else if (mp->m_qflags & XFS_UQUOTA_ACCT)
205-
seq_puts(m, ",uqnoenforce");
202+
if (mp->m_qflags & XFS_UQUOTA_ACCT) {
203+
if (mp->m_qflags & XFS_UQUOTA_ENFD)
204+
seq_puts(m, ",usrquota");
205+
else
206+
seq_puts(m, ",uqnoenforce");
207+
}
206208

207209
if (mp->m_qflags & XFS_PQUOTA_ACCT) {
208210
if (mp->m_qflags & XFS_PQUOTA_ENFD)

0 commit comments

Comments
 (0)