xfs: Check the return value of xfs_trans_get_buf()

Check the return value of xfs_trans_get_buf() and fail
appropriately.

Signed-off-by: Chandra Seetharaman <sekharan@us.ibm.com>
Signed-off-by: Alex Elder <aelder@sgi.com>
This commit is contained in:
Chandra Seetharaman
2011-09-20 13:56:55 +00:00
committed by Alex Elder
parent b522950f0a
commit 2a30f36d90
6 changed files with 30 additions and 11 deletions

View File

@@ -970,7 +970,8 @@ xfs_btree_get_buf_block(
*bpp = xfs_trans_get_buf(cur->bc_tp, mp->m_ddev_targp, d,
mp->m_bsize, flags);
ASSERT(!xfs_buf_geterror(*bpp));
if (!*bpp)
return ENOMEM;
*block = XFS_BUF_TO_BLOCK(*bpp);
return 0;