summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorShehjar Tikoo <shehjart@gluster.com>2011-03-11 04:32:20 +0000
committerVijay Bellur <vijay@dev.gluster.com>2011-03-11 21:58:26 -0800
commit609d5aa9c29e8af0b25c1922c8cdb2db2edbd481 (patch)
tree0ddf0588b7459bf2eac5ba2a70a6a5124eb40727
parent31f62d2a701f24851675a6f4edfdd60f8f7dda30 (diff)
posix: Set op_errno to ENOMEM on failed iobuf_get
This prevents a situation where op_ret for the read fop is -1 but the op_errno is still 0. Signed-off-by: Shehjar Tikoo <shehjart@gluster.com> Signed-off-by: Vijay Bellur <vijay@dev.gluster.com> BUG: 1977 () URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=1977
-rw-r--r--xlators/storage/posix/src/posix.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/xlators/storage/posix/src/posix.c b/xlators/storage/posix/src/posix.c
index ebe43d9e8e1..f95c9f8ffbc 100644
--- a/xlators/storage/posix/src/posix.c
+++ b/xlators/storage/posix/src/posix.c
@@ -2316,6 +2316,7 @@ posix_readv (call_frame_t *frame, xlator_t *this,
iobuf = iobuf_get (this->ctx->iobuf_pool);
if (!iobuf) {
+ op_errno = ENOMEM;
gf_log (this->name, GF_LOG_ERROR,
"Out of memory.");
goto out;