From: David Disseldorp Date: Tue, 21 Jan 2020 10:32:50 +0000 (+0100) Subject: Revert "vfs_glusterfs: Return fake fd from pipe() during open" X-Git-Tag: samba-4.12.0rc1~39 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=b813ef6ae7a8349f961f9f133de8f52d1127d90b;p=thirdparty%2Fsamba.git 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 Reviewed-by: Guenther Deschner --- 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);