diff options
Diffstat (limited to 'booster/src/booster.c')
-rw-r--r-- | booster/src/booster.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/booster/src/booster.c b/booster/src/booster.c index 48603c1fa63..3c4f487d899 100644 --- a/booster/src/booster.c +++ b/booster/src/booster.c @@ -897,12 +897,16 @@ lseek (int filedes, unsigned long offset, int whence) int ret; glusterfs_file_t glfs_fd = 0; - ret = real_lseek (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_lseek == NULL) { + errno = ENOSYS; + ret = -1; + } else + ret = real_lseek (filedes, offset, whence); } return ret; |