Skip to content

Commit c8d329f

Browse files
Eric Sandeendjwong
authored andcommitted
xfs: group quota should return EDQUOT when prj quota enabled
Long ago, group & project quota were mutually exclusive, and so when we turned on XFS_QMOPT_ENOSPC ("return ENOSPC if project quota is exceeded") when project quota was enabled, we only needed to disable it again for user quota. When group & project quota got separated, this got missed, and as a result if project quota is enabled and group quota is exceeded, the error code returned is incorrectly returned as ENOSPC not EDQUOT. Fix this by stripping XFS_QMOPT_ENOSPC out of flags for group quota when we try to reserve the space. Signed-off-by: Eric Sandeen <[email protected]> Reviewed-by: Christoph Hellwig <[email protected]> Reviewed-by: Brian Foster <[email protected]> Reviewed-by: Darrick J. Wong <[email protected]> Signed-off-by: Darrick J. Wong <[email protected]>
1 parent b41b46c commit c8d329f

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

fs/xfs/xfs_trans_dquot.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -758,7 +758,8 @@ xfs_trans_reserve_quota_bydquots(
758758
}
759759

760760
if (gdqp) {
761-
error = xfs_trans_dqresv(tp, mp, gdqp, nblks, ninos, flags);
761+
error = xfs_trans_dqresv(tp, mp, gdqp, nblks, ninos,
762+
(flags & ~XFS_QMOPT_ENOSPC));
762763
if (error)
763764
goto unwind_usr;
764765
}

0 commit comments

Comments
 (0)