summaryrefslogtreecommitdiffstats
path: root/xlators
diff options
context:
space:
mode:
authorRaghavendra G <raghavendra@zresearch.com>2009-06-04 06:13:58 +0000
committerAnand V. Avati <avati@dev.gluster.com>2009-06-11 06:29:17 -0700
commitbf76a04af4862554d6163c43a863afb59a39aafe (patch)
tree06bf0c3a8c9d05c4f98f0c57e184c0b79efeb392 /xlators
parent5219af500d6c4c39b95b09329de9426f97156d65 (diff)
read-ahead: unwind with a return value of -1 and error code of ENOMEM on memory allocation for ra_file in open/create
Signed-off-by: Anand V. Avati <avati@dev.gluster.com>
Diffstat (limited to 'xlators')
-rw-r--r--xlators/performance/read-ahead/src/read-ahead.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/xlators/performance/read-ahead/src/read-ahead.c b/xlators/performance/read-ahead/src/read-ahead.c
index 912e61dee..24a10eea0 100644
--- a/xlators/performance/read-ahead/src/read-ahead.c
+++ b/xlators/performance/read-ahead/src/read-ahead.c
@@ -57,6 +57,8 @@ ra_open_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
file = CALLOC (1, sizeof (*file));
if (!file) {
+ op_ret = -1;
+ op_errno = ENOMEM;
gf_log (this->name, GF_LOG_ERROR,
"out of memory");
goto unwind;
@@ -124,6 +126,8 @@ ra_create_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
file = CALLOC (1, sizeof (*file));
if (!file) {
+ op_ret = -1;
+ op_errno = ENOMEM;
gf_log (this->name, GF_LOG_ERROR,
"out of memory");
goto unwind;