From: Anoop C S Date: Thu, 13 Oct 2022 10:24:10 +0000 (+0530) Subject: vfs_glusterfs: Add path based fallback mechanism for SMB_VFS_FNTIMES X-Git-Tag: talloc-2.4.0~728 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=5d91ecf01dce95400da5d6ac181144df1e32ca35;p=thirdparty%2Fsamba.git vfs_glusterfs: Add path based fallback mechanism for SMB_VFS_FNTIMES Fallback mechanism was missing in vfs_gluster_fntimes() for path based call. Therefore adding a similar mechanism as seen with other calls like vfs_gluster_fsetxattr, vfs_gluster_fgetxattr etc. BUG: https://bugzilla.samba.org/show_bug.cgi?id=15198 Signed-off-by: Anoop C S Reviewed-by: Ralph Boehme --- diff --git a/source3/modules/vfs_glusterfs.c b/source3/modules/vfs_glusterfs.c index 4b309de1377..31e606ba5d0 100644 --- a/source3/modules/vfs_glusterfs.c +++ b/source3/modules/vfs_glusterfs.c @@ -1772,7 +1772,13 @@ static int vfs_gluster_fntimes(struct vfs_handle_struct *handle, return -1; } - ret = glfs_futimens(glfd, times); + if (!fsp->fsp_flags.is_pathref) { + ret = glfs_futimens(glfd, times); + } else { + ret = glfs_utimens(handle->data, + fsp->fsp_name->base_name, + times); + } END_PROFILE(syscall_fntimes); return ret;