]> www.infradead.org Git - users/hch/xfsprogs.git/commit
xfs_repair: fix dir_read_buf use of libxfs_da_read_buf
authorDarrick J. Wong <darrick.wong@oracle.com>
Wed, 8 Apr 2020 13:48:15 +0000 (09:48 -0400)
committerEric Sandeen <sandeen@sandeen.net>
Wed, 8 Apr 2020 13:48:15 +0000 (09:48 -0400)
commitdb8e64013fb1445fa7a37edff36cc457947c8708
treebd5285b6f46bd6bfca02a7288f439c0a33f894cf
parentf4afdcb0ad116028bc1950a472d85a7b64c108ba
xfs_repair: fix dir_read_buf use of libxfs_da_read_buf

xfs_da_read_buf dropped the 'mappedbno' argument in favor of a flags
argument.  Foolishly, we're passing that parameter (which is -1 in all
callers) to xfs_da_read_buf, which gets us the wrong behavior.

Since mappedbno == -1 meant "complain if we fall into a hole" (which is
the default behavior of xfs_da_read_buf) we can fix this by passing a
zero flags argument and getting rid of mappedbno entirely.

Coverity-id: 1457898
Fixes: 5f356ae6d ("xfs: remove the mappedbno argument to xfs_da_read_buf")
Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Reviewed-by: Allison Collins <allison.henderson@oracle.com>
Reviewed-by: Eric Sandeen <sandeen@redhat.com>
Signed-off-by: Eric Sandeen <sandeen@sandeen.net>
repair/phase6.c