summaryrefslogtreecommitdiffstats
path: root/fs/xfs/xfs_attr.c
diff options
context:
space:
mode:
authorChandra Seetharaman2011-09-07 21:37:54 +0200
committerAlex Elder2011-10-12 04:15:01 +0200
commitb522950f0ab8551f2ef56c210ebd50e6c6396601 (patch)
treeabdd6143268403b82de0e61296b2fe864ae98c10 /fs/xfs/xfs_attr.c
parentxfs: improve ioend error handling (diff)
downloadkernel-qcow2-linux-b522950f0ab8551f2ef56c210ebd50e6c6396601.tar.gz
kernel-qcow2-linux-b522950f0ab8551f2ef56c210ebd50e6c6396601.tar.xz
kernel-qcow2-linux-b522950f0ab8551f2ef56c210ebd50e6c6396601.zip
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.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/xfs/xfs_attr.c b/fs/xfs/xfs_attr.c
index 3dd5c9c374cb..c7dab0c0bdda 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);