]> git.ipfire.org Git - thirdparty/xfsprogs-dev.git/commit
xfs: xfs_dabuf_map should return ENOMEM when map allocation fails
authorDarrick J. Wong <darrick.wong@oracle.com>
Fri, 1 May 2020 21:37:09 +0000 (17:37 -0400)
committerEric Sandeen <sandeen@redhat.com>
Fri, 1 May 2020 21:37:09 +0000 (17:37 -0400)
commita2a0a99a70b02649250fe2c50ef9546f9e306d44
tree752fd22e70669fc9564354b1701d589d0aaba272
parent63789af3fb074054fd0026d8c37292efd3ec6c07
xfs: xfs_dabuf_map should return ENOMEM when map allocation fails

Source kernel commit: faf8ee8476c19b30fd16079ad616b2b0f56eaff4

If the xfs_buf_map array allocation in xfs_dabuf_map fails for whatever
reason, we bail out with error code zero.  This will confuse callers, so
make sure that we return ENOMEM.  Allocation failure should never happen
with the small size of the array, but code defensively anyway.

Fixes: 45feef8f50b94d ("xfs: refactor xfs_dabuf_map")
Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Chaitanya Kulkarni <chaitanya.kulkarni@wdc.com>
Signed-off-by: Eric Sandeen <sandeen@sandeen.net>
libxfs/xfs_da_btree.c