diff options
author | Chandra Seetharaman <sekharan@us.ibm.com> | 2011-09-07 19:37:54 +0000 |
---|---|---|
committer | Alex Elder <aelder@sgi.com> | 2011-10-11 21:15:01 -0500 |
commit | b522950f0ab8551f2ef56c210ebd50e6c6396601 (patch) | |
tree | abdd6143268403b82de0e61296b2fe864ae98c10 /fs/xfs/xfs_attr.c | |
parent | 04f658ee229f60dbb9a0dc2f3d6871b12b758051 (diff) |
xfs: Check the return value of xfs_buf_get()
Check the return value of xfs_buf_get() and fail appropriately.
Signed-off-by: Chandra Seetharaman <sekharan@us.ibm.com>
Signed-off-by: Alex Elder <aelder@sgi.com>
Diffstat (limited to 'fs/xfs/xfs_attr.c')
-rw-r--r-- | fs/xfs/xfs_attr.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/xfs/xfs_attr.c b/fs/xfs/xfs_attr.c index 3dd5c9c374c..c7dab0c0bdd 100644 --- a/fs/xfs/xfs_attr.c +++ b/fs/xfs/xfs_attr.c @@ -2109,8 +2109,8 @@ xfs_attr_rmtval_set(xfs_da_args_t *args) bp = xfs_buf_get(mp->m_ddev_targp, dblkno, blkcnt, XBF_LOCK | XBF_DONT_BLOCK); - ASSERT(!xfs_buf_geterror(bp)); - + if (!bp) + return ENOMEM; tmp = (valuelen < XFS_BUF_SIZE(bp)) ? valuelen : XFS_BUF_SIZE(bp); xfs_buf_iomove(bp, 0, tmp, src, XBRW_WRITE); |