From 390221fcc4cc974074750be223e551bd9f4405d9 Mon Sep 17 00:00:00 2001 From: "M. Mohan Kumar" Date: Fri, 11 Oct 2013 17:29:10 +0530 Subject: posix: Fix readv FOP Suggested by Anand Avati in BD xlator code review. Change-Id: I31c353a26dfdeb3d0023c3f7e03ed25461d13c16 Signed-off-by: M. Mohan Kumar BUG: 837495 Reviewed-on: http://review.gluster.org/6077 Reviewed-by: Vijay Bellur Tested-by: Vijay Bellur --- xlators/storage/posix/src/posix-aio.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'xlators/storage/posix/src/posix-aio.c') diff --git a/xlators/storage/posix/src/posix-aio.c b/xlators/storage/posix/src/posix-aio.c index 5eed7f1a0b9..c3bbddd6737 100644 --- a/xlators/storage/posix/src/posix-aio.c +++ b/xlators/storage/posix/src/posix-aio.c @@ -136,11 +136,7 @@ posix_aio_readv_complete (struct posix_aio_cb *paiocb, int res, int res2) /* Hack to notify higher layers of EOF. */ - if (postbuf.ia_size == 0) - op_errno = ENOENT; - else if ((offset + iov.iov_len) == postbuf.ia_size) - op_errno = ENOENT; - else if (offset > postbuf.ia_size) + if (!postbuf.ia_size || (offset + iov.iov_len) >= postbuf.ia_size) op_errno = ENOENT; LOCK (&priv->lock); -- cgit