diff options
author | Shehjar Tikoo <shehjart@gluster.com> | 2011-03-11 02:21:10 +0000 |
---|---|---|
committer | Vijay Bellur <vijay@dev.gluster.com> | 2011-03-11 20:47:53 -0800 |
commit | 1c6e8fdf678d18e3b1a5472ebc076e7b3cb323e4 (patch) | |
tree | e5d411dbccd6ab685aa6c322e67a9bf2e8df22a1 | |
parent | 190ef2ee5006614615144ed46935d1f8267bd021 (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
-rw-r--r-- | xlators/storage/posix/src/posix.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/xlators/storage/posix/src/posix.c b/xlators/storage/posix/src/posix.c index e3130f4f1..ebe43d9e8 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: |