summaryrefslogtreecommitdiffstats
path: root/xlators/storage
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 20:48:01 -0800
commit57d4551c05cdc17d2a9d687aca66802ce7af53f0 (patch)
tree889b30b90c1082b28b6041246367a7f301a14673 /xlators/storage
parent1c6e8fdf678d18e3b1a5472ebc076e7b3cb323e4 (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
Diffstat (limited to 'xlators/storage')
-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;