]> git.baikalelectronics.ru Git - kernel.git/commit
xfs: improve ondisk dquot flags checking
authorDarrick J. Wong <darrick.wong@oracle.com>
Thu, 16 Jul 2020 01:39:51 +0000 (18:39 -0700)
committerDarrick J. Wong <darrick.wong@oracle.com>
Wed, 29 Jul 2020 03:24:14 +0000 (20:24 -0700)
commitea1b75113928a0570a0f844489dd6284ec3e12b8
tree6d1c7327bb9fd6d474a2149a859cdb8eb6d3610f
parente00b257b4686ab48e081e7fa599c7d81d995a020
xfs: improve ondisk dquot flags checking

Create an XFS_DQTYPE_ANY mask for ondisk dquots flags, and use that to
ensure that we never accept any garbage flags when we're loading dquots.
While we're at it, restructure the quota type flag checking to use the
proper masking.

Note that I plan to add y2038 support soon, which will require a new
xfs_dqtype_t flag for extended timestamp support, hence all the work to
make the type masking work correctly.

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/libxfs/xfs_dquot_buf.c
fs/xfs/libxfs/xfs_format.h