xfs: refactor default quota grace period setting code

Refactor the code that sets the default quota grace period into a helper
function so that we can override the ondisk behavior later.

Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Reviewed-by: Amir Goldstein <amir73il@gmail.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Allison Collins <allison.henderson@oracle.com>
Reviewed-by: Dave Chinner <dchinner@redhat.com>
This commit is contained in:
Darrick J. Wong
2020-08-17 09:58:42 -07:00
parent 11d8a91902
commit ccc8e771aa
4 changed files with 24 additions and 2 deletions

View File

@@ -486,8 +486,8 @@ xfs_setqlim_timer(
{
if (qlim) {
/* Set the length of the default grace period. */
res->timer = timer;
qlim->time = timer;
res->timer = xfs_dquot_set_grace_period(timer);
qlim->time = res->timer;
} else {
/* Set the grace period expiration on a quota. */
res->timer = xfs_dquot_set_timeout(mp, timer);