summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Disseldorp <ddiss@samba.org>2020-01-21 11:32:50 +0100
committerStefan Metzmacher <metze@samba.org>2020-01-21 14:38:44 +0000
commitb813ef6ae7a8349f961f9f133de8f52d1127d90b (patch)
treea3717e702b5b415727c4862f0591d90c40d8829a
parentcc4a55d290c2d34d9dcaccef74385c9251d13e15 (diff)
downloadsamba-b813ef6ae7a8349f961f9f133de8f52d1127d90b.tar.gz
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>
-rw-r--r--source3/modules/vfs_glusterfs.c14
1 files changed, 2 insertions, 12 deletions
diff --git a/source3/modules/vfs_glusterfs.c b/source3/modules/vfs_glusterfs.c
index 918b06b5f8e..059aeb42ab5 100644
--- a/source3/modules/vfs_glusterfs.c
+++ b/source3/modules/vfs_glusterfs.c
@@ -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);