xfs: fix inobt magic number check
authorDarrick J. Wong <darrick.wong@oracle.com>
Thu, 24 May 2018 15:54:59 +0000 (08:54 -0700)
committerDarrick J. Wong <darrick.wong@oracle.com>
Tue, 29 May 2018 17:46:03 +0000 (10:46 -0700)
In commit a6a781a58befcbd467c ("xfs: have buffer verifier functions
report failing address") the bad magic number return was ported
incorrectly.

Fixes: a6a781a58befcbd467ce843af4eaca3906aa1f08
Reported-by: syzbot+08ab33be0178b76851c8@syzkaller.appspotmail.com
Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Reviewed-by: Eric Sandeen <sandeen@redhat.com>
fs/xfs/libxfs/xfs_ialloc_btree.c

index ba053a4..b04c555 100644 (file)
@@ -296,7 +296,7 @@ xfs_inobt_verify(
        case cpu_to_be32(XFS_FIBT_MAGIC):
                break;
        default:
-               return NULL;
+               return __this_address;
        }
 
        /* level verification */