xfs: fix bounds check in xfs_defer_agfl_block()
[ Upstream commit 2bed0d82 ] Need to happen before we allocate and then leak the xefi. Found by coverity via an xfsprogs libxfs scan. [djwong: This also fixes the type of the @agbno argument.] Fixes: 7dfee17b ("xfs: validate block number being freed before adding to xefi") Signed-off-by:Dave Chinner <dchinner@redhat.com> Reviewed-by:
Christoph Hellwig <hch@lst.de> Reviewed-by:
Darrick J. Wong <djwong@kernel.org> Signed-off-by:
Darrick J. Wong <djwong@kernel.org> Signed-off-by:
Leah Rumancik <leah.rumancik@gmail.com> Acked-by:
"Darrick J. Wong" <djwong@kernel.org> Signed-off-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Loading