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

@ -402,8 +402,11 @@ xfs_qm_dqalloc(
dqp->q_blkno,
mp->m_quotainfo->qi_dqchunklen,
0);
if (!bp || (error = xfs_buf_geterror(bp)))
error = xfs_buf_geterror(bp);
if (error)
goto error1;
/*
* Make a chunk of dquots out of this buffer and log
* the entire thing.