]> git.baikalelectronics.ru Git - kernel.git/commit
xfs: preserve default grace interval during quotacheck
authorDarrick J. Wong <darrick.wong@oracle.com>
Wed, 26 Oct 2022 06:28:33 +0000 (11:58 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 29 Oct 2022 08:20:33 +0000 (10:20 +0200)
commitb9bd43bc18e4d7487de8f4a1372f89651267cfed
treecff017d943c0a526e37a434ad7f312ae93b00068
parente88a5aff8de12f6e62481381cdd754aaa65fac22
xfs: preserve default grace interval during quotacheck

commit 69f3ea28d03a3b505f94c10c3c5c50a958a819f4 upstream.

When quotacheck runs, it zeroes all the timer fields in every dquot.
Unfortunately, it also does this to the root dquot, which erases any
preconfigured grace intervals and warning limits that the administrator
may have set.  Worse yet, the incore copies of those variables remain
set.  This cache coherence problem manifests itself as the grace
interval mysteriously being reset back to the defaults at the /next/
mount.

Fix it by not resetting the root disk dquot's timer and warning fields.

Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Reviewed-by: Dave Chinner <dchinner@redhat.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Acked-by: Darrick J. Wong <djwong@kernel.org>
Signed-off-by: Chandan Babu R <chandan.babu@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
fs/xfs/xfs_qm.c