]> git.baikalelectronics.ru Git - kernel.git/commit
xfs: relax shortform directory size checks
authorDarrick J. Wong <darrick.wong@oracle.com>
Sat, 2 Nov 2019 16:38:08 +0000 (09:38 -0700)
committerDarrick J. Wong <darrick.wong@oracle.com>
Mon, 4 Nov 2019 21:54:58 +0000 (13:54 -0800)
commitcf1ae6bff46fa9a39660364cac0c9eb8038de94c
tree74eb4dd02b63eb15f50bb0415459fa5e6f6e3d21
parentffe263c8430e8b40d0f4e4ef759f5c38c8ff90a6
xfs: relax shortform directory size checks

Each of the four functions that operate on shortform directories checks
that the directory's di_size is at least as large as the shortform
directory header.  This is now checked by the inode fork verifiers
(di_size is used to allocate if_bytes, and if_bytes is checked against
the header structure size) so we can turn these checks into ASSERTions.

Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Reviewed-by: Carlos Maiolino <cmaiolino@redhat.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
fs/xfs/libxfs/xfs_dir2_block.c
fs/xfs/libxfs/xfs_dir2_sf.c