xfs: validate allocated inode number
authorDave Chinner <dchinner@redhat.com>
Wed, 18 Apr 2018 00:17:35 +0000 (17:17 -0700)
committerDarrick J. Wong <darrick.wong@oracle.com>
Wed, 9 May 2018 17:04:00 +0000 (10:04 -0700)
commit8b26984dbd813b1f63267baa258c9932e7f6c835
treedd3e37346dd0c0bcebe9353a526ea3f294675155
parentafca6c5b2595fc44383919fba740c194b0b76aff
xfs: validate allocated inode number

When we have corrupted free inode btrees, we can attempt to
allocate inodes that we know are already allocated. Catch allocation
of these inodes and report corruption as early as possible to
prevent corruption propagation or deadlocks.

Signed-Off-By: Dave Chinner <dchinner@redhat.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Carlos Maiolino <cmaiolino@redhat.com>
Reviewed-by: Darrick J. Wong <darrick.wong@oracle.com>
Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
fs/xfs/xfs_inode.c