From 609d5aa9c29e8af0b25c1922c8cdb2db2edbd481 Mon Sep 17 00:00:00 2001 From: Shehjar Tikoo Date: Fri, 11 Mar 2011 04:32:20 +0000 Subject: 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 Signed-off-by: Vijay Bellur BUG: 1977 () URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=1977 --- xlators/storage/posix/src/posix.c | 1 + 1 file changed, 1 insertion(+) diff --git a/xlators/storage/posix/src/posix.c b/xlators/storage/posix/src/posix.c index ebe43d9e8..f95c9f8ff 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; -- cgit