]> git.baikalelectronics.ru Git - kernel.git/commit
xfs: fix btree scrub checking with regards to root-in-inode
authorDarrick J. Wong <darrick.wong@oracle.com>
Tue, 19 Mar 2019 15:16:22 +0000 (08:16 -0700)
committerDarrick J. Wong <darrick.wong@oracle.com>
Tue, 19 Mar 2019 15:16:41 +0000 (08:16 -0700)
commit7888b90edb63b47008409b5915b258cfa5724ba8
treef087519884ca80bdce715aa5475ecab35fd257f4
parent8e203aada492c394bbdb077c7a93ff60a8be5c91
xfs: fix btree scrub checking with regards to root-in-inode

In xchk_btree_check_owner, we can be passed a null buffer pointer.  This
should only happen for the root of a root-in-inode btree type, but we
should program defensively in case the btree cursor state ever gets
screwed up and we get a null buffer anyway.

Coverity-id: 1438713
Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Reviewed-by: Brian Foster <bfoster@redhat.com>
fs/xfs/scrub/btree.c