1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-12 09:18:10 +03:00

vfs_glusterfs: Add path based fallback mechanism for SMB_VFS_FGETXATTR

Fallback mechanism was missing in vfs_gluster_fgetxattr() for path based
call. Therefore adding a similar mechanism as seen with other calls like
vfs_gluster_fsetxattr, vfs_gluster_flistxattr etc.

BUG: https://bugzilla.samba.org/show_bug.cgi?id=15198

Signed-off-by: Anoop C S <anoopcs@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
This commit is contained in:
Anoop C S 2022-10-10 20:29:13 +05:30 committed by Ralph Boehme
parent 6a6bd1a053
commit 7af4bfe828

View File

@ -2315,7 +2315,21 @@ static ssize_t vfs_gluster_fgetxattr(struct vfs_handle_struct *handle,
return -1;
}
return glfs_fgetxattr(glfd, name, value, size);
if (!fsp->fsp_flags.is_pathref) {
/*
* We can use an io_fd to retrieve xattr value.
*/
return glfs_fgetxattr(glfd, name, value, size);
}
/*
* This is no longer a handle based call.
*/
return glfs_getxattr(handle->data,
fsp->fsp_name->base_name,
name,
value,
size);
}
static ssize_t vfs_gluster_flistxattr(struct vfs_handle_struct *handle,