]> git.baikalelectronics.ru Git - kernel.git/commit
xfs: xfs_dabuf_map should return ENOMEM when map allocation fails
authorDarrick J. Wong <darrick.wong@oracle.com>
Fri, 13 Mar 2020 20:17:40 +0000 (13:17 -0700)
committerDarrick J. Wong <darrick.wong@oracle.com>
Sun, 15 Mar 2020 16:22:35 +0000 (09:22 -0700)
commitb0d423b0eceb6f47845ccfc8de2b8fd021566770
tree4edb9803f5fd1aaad54d9f00cd196051166ff1f7
parentc43aa2330b9dfc77ae98dd2af825ea62b4158507
xfs: xfs_dabuf_map should return ENOMEM when map allocation fails

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: 875c94b0d3f369 ("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>
fs/xfs/libxfs/xfs_da_btree.c