summaryrefslogtreecommitdiffstats
path: root/xlators/storage/posix/src/posix-aio.c
diff options
context:
space:
mode:
authorPranith Kumar K <pkarampu@redhat.com>2016-06-07 21:27:10 +0530
committerPranith Kumar Karampuri <pkarampu@redhat.com>2016-06-26 23:18:13 -0700
commitd5088c056d5aee1bda2997ad5835379465fed3a1 (patch)
tree122fa5d61e5a0e4dd668fb77cbe814e8267b7131 /xlators/storage/posix/src/posix-aio.c
parent0d280e0b7f2042e78b8d94a48d5e3bcc5c13f422 (diff)
storage/posix: Give correct errno for anon-fd operations
Change-Id: Ia9e61d3baa6881eb7dc03dd8ddb6bfdde5a01958 BUG: 1343906 Signed-off-by: Pranith Kumar K <pkarampu@redhat.com> Reviewed-on: http://review.gluster.org/14669 Smoke: Gluster Build System <jenkins@build.gluster.org> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> CentOS-regression: Gluster Build System <jenkins@build.gluster.org> Reviewed-by: Raghavendra G <rgowdapp@redhat.com>
Diffstat (limited to 'xlators/storage/posix/src/posix-aio.c')
-rw-r--r--xlators/storage/posix/src/posix-aio.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/xlators/storage/posix/src/posix-aio.c b/xlators/storage/posix/src/posix-aio.c
index 44824943fe4..d8ef5f7b73f 100644
--- a/xlators/storage/posix/src/posix-aio.c
+++ b/xlators/storage/posix/src/posix-aio.c
@@ -174,9 +174,8 @@ posix_aio_readv (call_frame_t *frame, xlator_t *this, fd_t *fd,
priv = this->private;
- ret = posix_fd_ctx_get (fd, this, &pfd);
+ ret = posix_fd_ctx_get (fd, this, &pfd, &op_errno);
if (ret < 0) {
- op_errno = -ret;
gf_msg (this->name, GF_LOG_WARNING, op_errno, P_MSG_PFD_NULL,
"pfd is NULL from fd=%p", fd);
goto err;
@@ -332,9 +331,8 @@ posix_aio_writev (call_frame_t *frame, xlator_t *this, fd_t *fd,
priv = this->private;
- ret = posix_fd_ctx_get (fd, this, &pfd);
+ ret = posix_fd_ctx_get (fd, this, &pfd, &op_errno);
if (ret < 0) {
- op_errno = -ret;
gf_msg (this->name, GF_LOG_WARNING, op_errno, P_MSG_PFD_NULL,
"pfd is NULL from fd=%p", fd);
goto err;