]> git.baikalelectronics.ru Git - kernel.git/commit
xfs: preserve default grace interval during quotacheck
authorDarrick J. Wong <darrick.wong@oracle.com>
Wed, 25 Mar 2020 03:12:53 +0000 (20:12 -0700)
committerDarrick J. Wong <darrick.wong@oracle.com>
Thu, 26 Mar 2020 15:19:24 +0000 (08:19 -0700)
commit69f3ea28d03a3b505f94c10c3c5c50a958a819f4
treeb2ab51f8136252735d7a37aecb0914304ae1fd8e
parente9862766c8ec7e7f860c40a0262df417bede809e
xfs: preserve default grace interval during quotacheck

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>
fs/xfs/xfs_qm.c