From e3f80f53b536eba17e35c184e9da3e4d59c30b58 Mon Sep 17 00:00:00 2001 From: Anand Avati Date: Mon, 25 Nov 2013 03:19:11 -0800 Subject: 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 Reviewed-on: http://review.gluster.org/6351 Tested-by: Gluster Build System Reviewed-by: Amar Tumballi --- xlators/performance/io-cache/src/page.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'xlators/performance') diff --git a/xlators/performance/io-cache/src/page.c b/xlators/performance/io-cache/src/page.c index b2e20ba65..64c5f6b66 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); -- cgit