1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-25 23:21:54 +03:00

VFS: gluster: Allow vfs_gluster_fremovexattr() to cope with pathref fsps.

Ensure it only uses an io fd for a handle based call.

Otherwise fall back to pathname based. This is the same as the
fallback used in vfs_default.c

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
This commit is contained in:
Jeremy Allison 2021-03-12 14:19:28 -08:00 committed by Ralph Boehme
parent ea1b763b6a
commit 0c335a325d

View File

@ -2080,8 +2080,19 @@ static int vfs_gluster_fremovexattr(struct vfs_handle_struct *handle,
DBG_ERR("Failed to fetch gluster fd\n");
return -1;
}
return glfs_fremovexattr(glfd, name);
if (!fsp->fsp_flags.is_pathref) {
/*
* We can use an io_fd to remove xattrs.
*/
return glfs_fremovexattr(glfd, name);
} else {
/*
* This is no longer a handle based call.
*/
return glfs_removexattr(handle->data,
fsp->fsp_name->base_name,
name);
}
}
static int vfs_gluster_fsetxattr(struct vfs_handle_struct *handle,