summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--booster/src/booster.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/booster/src/booster.c b/booster/src/booster.c
index 3c4f487d8..46db2b621 100644
--- a/booster/src/booster.c
+++ b/booster/src/booster.c
@@ -919,12 +919,17 @@ lseek64 (int filedes, uint64_t offset, int whence)
int ret;
glusterfs_file_t glfs_fd = 0;
- ret = real_lseek64 (filedes, offset, whence);
glfs_fd = booster_get_glfs_fd (booster_glfs_fdtable, filedes);
if (glfs_fd) {
ret = glusterfs_lseek (glfs_fd, offset, whence);
booster_put_glfs_fd (glfs_fd);
+ } else {
+ if (real_lseek64 == NULL) {
+ errno = ENOSYS;
+ ret = -1;
+ } else
+ ret = real_lseek64 (filedes, offset, whence);
}
return ret;