From 1c6e8fdf678d18e3b1a5472ebc076e7b3cb323e4 Mon Sep 17 00:00:00 2001 From: Shehjar Tikoo Date: Fri, 11 Mar 2011 02:21:10 +0000 Subject: posix: Handle offset greater than file size of EOF determination 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 | 2 ++ 1 file changed, 2 insertions(+) (limited to 'xlators/storage') 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: -- cgit