summaryrefslogtreecommitdiffstats
path: root/xlators/storage/posix/src/posix.c
diff options
context:
space:
mode:
authorXavi Hernandez <xhernandez@redhat.com>2018-08-02 22:55:35 +0200
committerShyamsundar Ranganathan <srangana@redhat.com>2018-08-03 22:20:15 +0000
commite47a320508661d8f33a7b583cf7f6999070d37de (patch)
tree405db2c00c5246eefdf84c1849c0c423b8d4d55d /xlators/storage/posix/src/posix.c
parent60fbef9a0b6057e87f3a4fbdcb3270bd65b649c1 (diff)
posix: prevent crash when SEEK_DATA/HOLE is not supported
Instead of not defining the 'seek' fop when it's not supported on the compilation platform, we simply return EINVAL when it's used. Fixes: bz#1611834 Change-Id: I253666d8910c5e2fffa3a3ba37085e5c1c058a8e Signed-off-by: Xavi Hernandez <xhernandez@redhat.com>
Diffstat (limited to 'xlators/storage/posix/src/posix.c')
-rw-r--r--xlators/storage/posix/src/posix.c2
1 files changed, 0 insertions, 2 deletions
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,
};