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>
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,