mirror of
https://github.com/samba-team/samba.git
synced 2025-01-27 14:04:05 +03:00
Revert "vfs_glusterfs: Return fake fd from pipe() during open"
This reverts commit c9adf47ac5a5aa0dd12572c34b08cc51f15b2e97. The fake fd is no longer necessary, as vfs_glusterfs now provides a fcntl_fn hook. BUG: https://bugzilla.samba.org/show_bug.cgi?id=14241 Signed-off-by: David Disseldorp <ddiss@samba.org> Reviewed-by: Guenther Deschner <gd@samba.org>
This commit is contained in:
parent
cc4a55d290
commit
b813ef6ae7
@ -630,7 +630,6 @@ static int vfs_gluster_open(struct vfs_handle_struct *handle,
|
||||
{
|
||||
glfs_fd_t *glfd;
|
||||
glfs_fd_t **p_tmp;
|
||||
int fakefd[2];
|
||||
|
||||
START_PROFILE(syscall_open);
|
||||
|
||||
@ -660,15 +659,8 @@ static int vfs_gluster_open(struct vfs_handle_struct *handle,
|
||||
*p_tmp = glfd;
|
||||
|
||||
END_PROFILE(syscall_open);
|
||||
|
||||
if (pipe(fakefd) == -1) {
|
||||
DBG_ERR("pipe failed: %s\n", strerror(errno));
|
||||
return -1;
|
||||
}
|
||||
|
||||
close(fakefd[1]);
|
||||
|
||||
return fakefd[0];
|
||||
/* An arbitrary value for error reporting, so you know its us. */
|
||||
return 13371337;
|
||||
}
|
||||
|
||||
static int vfs_gluster_close(struct vfs_handle_struct *handle,
|
||||
@ -686,8 +678,6 @@ static int vfs_gluster_close(struct vfs_handle_struct *handle,
|
||||
return -1;
|
||||
}
|
||||
|
||||
close(fsp->fh->fd);
|
||||
|
||||
VFS_REMOVE_FSP_EXTENSION(handle, fsp);
|
||||
|
||||
ret = glfs_close(glfd);
|
||||
|
Loading…
x
Reference in New Issue
Block a user