]> git.baikalelectronics.ru Git - kernel.git/commit
xfs: directory scrub should check the null bestfree entries too
authorDarrick J. Wong <darrick.wong@oracle.com>
Mon, 9 Nov 2020 00:32:42 +0000 (16:32 -0800)
committerDarrick J. Wong <darrick.wong@oracle.com>
Wed, 18 Nov 2020 17:23:50 +0000 (09:23 -0800)
commitec305e559faba4b90d2e31cd3733afc85af81a0b
tree5ea9a4e6cb85cc766970f8fdc4b2c69ef4b2b723
parent8f1840afaeca0aaaea63fca72d6142d97af1ed45
xfs: directory scrub should check the null bestfree entries too

Teach the directory scrubber to check all the bestfree entries,
including the null ones.  We want to be able to detect the case where
the entry is null but there actually /is/ a directory data block.

Found by fuzzing lbests[0] = ones in xfs/391.

Fixes: dd578fa6316f ("xfs: scrub directory freespace")
Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Reviewed-by: Chandan Babu R <chandanrlinux@gmail.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
fs/xfs/scrub/dir.c