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:16 -0700
commit3f4362cedee499beb6a872b3dbb3ac920aa51d21 (patch)
tree4929d2350c44dfa61fd74572d1f8cc1c722a96db /xlators
parentcc2c0b53566584279f624d49bd1cb70936bbf5ea (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;