]> 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)
commit40df10807c1d0cee3834588cec738875d5ffb236
tree5ea9a4e6cb85cc766970f8fdc4b2c69ef4b2b723
parent60cca01ccc6e709d9c526117f3f617571babe4c1
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: 300d0257ab5f ("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