summaryrefslogtreecommitdiffstats
path: root/xlators
diff options
context:
space:
mode:
authorShehjar Tikoo <shehjart@gluster.com>2011-03-11 02:21:10 +0000
committerVijay Bellur <vijay@dev.gluster.com>2011-03-11 21:58:21 -0800
commit31f62d2a701f24851675a6f4edfdd60f8f7dda30 (patch)
tree8cce628bec61e06af6d75b03140548ca8841d8bc /xlators
parent5017098718059005e05873aa299a0fb5cb05fa90 (diff)
posix: Handle offset greater than file size of EOF determination
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')
-rw-r--r--xlators/storage/posix/src/posix.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/xlators/storage/posix/src/posix.c b/xlators/storage/posix/src/posix.c
index e3130f4f1e0..ebe43d9e8e1 100644
--- a/xlators/storage/posix/src/posix.c
+++ b/xlators/storage/posix/src/posix.c
@@ -2363,6 +2363,8 @@ posix_readv (call_frame_t *frame, xlator_t *this,
op_errno = ENOENT;
else if ((offset + vec.iov_len) == stbuf.ia_size)
op_errno = ENOENT;
+ else if (offset > stbuf.ia_size)
+ op_errno = ENOENT;
op_ret = vec.iov_len;
out: