summaryrefslogtreecommitdiffstats
path: root/booster/src/booster.c
diff options
context:
space:
mode:
Diffstat (limited to 'booster/src/booster.c')
-rw-r--r--booster/src/booster.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/booster/src/booster.c b/booster/src/booster.c
index 81c60574665..ec726178ecc 100644
--- a/booster/src/booster.c
+++ b/booster/src/booster.c
@@ -723,12 +723,13 @@ pread64 (int fd, void *buf, size_t count, uint64_t offset)
glfs_fd = booster_get_glfs_fd (booster_glfs_fdtable, fd);
if (!glfs_fd) {
- ret = real_pread (fd, buf, count, offset);
+ if (real_pread64 == NULL) {
+ errno = ENOSYS;
+ ret = -1;
+ } else
+ ret = real_pread64 (fd, buf, count, offset);
} else {
ret = glusterfs_pread (glfs_fd, buf, count, offset);
- if (ret == -1) {
- ret = real_pread (fd, buf, count, offset);
- }
}
return ret;