summaryrefslogtreecommitdiffstats
path: root/xlators/performance/io-cache
diff options
context:
space:
mode:
authorAnand Avati <avati@redhat.com>2013-11-25 03:19:11 -0800
committerAnand Avati <avati@redhat.com>2013-11-26 10:31:48 -0800
commite3f80f53b536eba17e35c184e9da3e4d59c30b58 (patch)
tree66d504edab711a77d9350c711653b37dea101bf8 /xlators/performance/io-cache
parent2a18e2426419cbab2f98368b3306fd37958394d2 (diff)
io-cache: handle iobref_merge() error gracefully
.. by UNWINDing ENOMEM, rather than leaving pointer in vector pointing to stale memory. Change-Id: I7f3917ac056fae144f845c9d123233e91e278187 BUG: 1034398 Signed-off-by: Anand Avati <avati@redhat.com> Reviewed-on: http://review.gluster.org/6351 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Amar Tumballi <amarts@gmail.com>
Diffstat (limited to 'xlators/performance/io-cache')
-rw-r--r--xlators/performance/io-cache/src/page.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/xlators/performance/io-cache/src/page.c b/xlators/performance/io-cache/src/page.c
index b2e20ba659f..64c5f6b66d5 100644
--- a/xlators/performance/io-cache/src/page.c
+++ b/xlators/performance/io-cache/src/page.c
@@ -855,7 +855,10 @@ ioc_frame_unwind (call_frame_t *frame)
copied += (fill->count * sizeof (*vector));
- iobref_merge (iobref, fill->iobref);
+ if (iobref_merge (iobref, fill->iobref)) {
+ op_ret = -1;
+ op_errno = ENOMEM;
+ }
}
list_del (&fill->list);