summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--xlators/storage/posix/src/posix-inode-fd-ops.c6
-rw-r--r--xlators/storage/posix/src/posix.c2
2 files changed, 4 insertions, 4 deletions
diff --git a/xlators/storage/posix/src/posix-inode-fd-ops.c b/xlators/storage/posix/src/posix-inode-fd-ops.c
index 8cfc4bceebc..1d15801b183 100644
--- a/xlators/storage/posix/src/posix-inode-fd-ops.c
+++ b/xlators/storage/posix/src/posix-inode-fd-ops.c
@@ -1049,11 +1049,11 @@ posix_ipc (call_frame_t *frame, xlator_t *this, int32_t op, dict_t *xdata)
}
-#ifdef HAVE_SEEK_HOLE
int32_t
posix_seek (call_frame_t *frame, xlator_t *this, fd_t *fd, off_t offset,
gf_seek_what_t what, dict_t *xdata)
{
+#ifdef HAVE_SEEK_HOLE
struct posix_fd *pfd = NULL;
off_t ret = -1;
int err = 0;
@@ -1123,9 +1123,11 @@ out:
STACK_UNWIND_STRICT (seek, frame, (ret == -1 ? -1 : 0), err,
(ret == -1 ? -1 : ret), rsp_xdata);
+#else
+ STACK_UNWIND_STRICT (seek, frame, -1, EINVAL, 0, NULL);
+#endif
return 0;
}
-#endif
int32_t
posix_opendir (call_frame_t *frame, xlator_t *this,
diff --git a/xlators/storage/posix/src/posix.c b/xlators/storage/posix/src/posix.c
index c3e48d55ae6..b8a71ce0fd8 100644
--- a/xlators/storage/posix/src/posix.c
+++ b/xlators/storage/posix/src/posix.c
@@ -75,9 +75,7 @@ struct xlator_fops fops = {
.discard = posix_discard,
.zerofill = posix_zerofill,
.ipc = posix_ipc,
-#ifdef HAVE_SEEK_HOLE
.seek = posix_seek,
-#endif
.lease = posix_lease,
.put = posix_put,
};