summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAnand Avati <avati@redhat.com>2013-11-25 03:13:17 -0800
committerAnand Avati <avati@redhat.com>2013-11-26 10:32:00 -0800
commitd4c9d342f64636304720d0091a605c85ea9f0e4d (patch)
treef293396847dbe04c9360ef8f392396c27ff36a1a
parente3f80f53b536eba17e35c184e9da3e4d59c30b58 (diff)
write-behind: handle iobref_merge() error gracefully
.. by UNWINDing ENOMEM error, rather than crashing. Change-Id: Ica2d6399eaf7e381e7ebc41155620559c139c4d3 BUG: 1034398 Signed-off-by: Anand Avati <avati@redhat.com> Reviewed-on: http://review.gluster.org/6349 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Amar Tumballi <amarts@gmail.com>
-rw-r--r--xlators/performance/write-behind/src/write-behind.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/xlators/performance/write-behind/src/write-behind.c b/xlators/performance/write-behind/src/write-behind.c
index 95c5921c6..2be211fbf 100644
--- a/xlators/performance/write-behind/src/write-behind.c
+++ b/xlators/performance/write-behind/src/write-behind.c
@@ -766,8 +766,9 @@ wb_fulfill_head (wb_inode_t *wb_inode, wb_request_t *head)
list_for_each_entry (req, &head->winds, winds) {
WB_IOV_LOAD (vector, count, req, head);
- iobref_merge (head->stub->args.iobref,
- req->stub->args.iobref);
+ if (iobref_merge (head->stub->args.iobref,
+ req->stub->args.iobref))
+ goto err;
}
if (wb_fd_err (head->fd, this, NULL)) {