From c5e4597662e3de00109db14c275d2b85e1002787 Mon Sep 17 00:00:00 2001 From: Anoop C S Date: Mon, 20 Jan 2020 16:37:49 +0530 Subject: [PATCH] vfs_glusterfs: Add dummy implementation of SMB_VFS_FCNTL Signed-off-by: Anoop C S --- source3/modules/vfs_glusterfs.c | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/source3/modules/vfs_glusterfs.c b/source3/modules/vfs_glusterfs.c index 2520382c42f..1e752f20341 100644 --- a/source3/modules/vfs_glusterfs.c +++ b/source3/modules/vfs_glusterfs.c @@ -1621,6 +1621,30 @@ static int vfs_gluster_kernel_flock(struct vfs_handle_struct *handle, return -1; } +static int vfs_gluster_fcntl(struct vfs_handle_struct *handle, files_struct *fsp, + int cmd, va_list cmd_arg) +{ + int result; + + START_PROFILE(syscall_fcntl); + + switch(cmd) { + case F_SETFL: + case F_GETFL: + DBG_DEBUG("Ignoring change of file status flags using open fd"); + errno = 0; + result = 0; + break; + default: + errno = ENOSYS; + result = -1; + } + + END_PROFILE(syscall_fcntl); + + return result; +} + static int vfs_gluster_linux_setlease(struct vfs_handle_struct *handle, files_struct *fsp, int leasetype) { @@ -1975,6 +1999,7 @@ static struct vfs_fn_pointers glusterfs_fns = { .fallocate_fn = vfs_gluster_fallocate, .lock_fn = vfs_gluster_lock, .kernel_flock_fn = vfs_gluster_kernel_flock, + .fcntl_fn = vfs_gluster_fcntl, .linux_setlease_fn = vfs_gluster_linux_setlease, .getlock_fn = vfs_gluster_getlock, .symlinkat_fn = vfs_gluster_symlinkat, -- 2.24.1