summaryrefslogtreecommitdiffstats
path: root/xlators/storage
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 20:47:53 -0800
commit1c6e8fdf678d18e3b1a5472ebc076e7b3cb323e4 (patch)
treee5d411dbccd6ab685aa6c322e67a9bf2e8df22a1 /xlators/storage
parent190ef2ee5006614615144ed46935d1f8267bd021 (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/storage')
-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: