From: Jeremy Allison Date: Mon, 30 Apr 2018 16:51:34 +0000 (-0700) Subject: s3: VFS: default: Remove recursion into the VFS inside the default pread call. X-Git-Tag: ldb-1.4.0~465 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c68cfbcee6a19a19401893706d72994725b05ef5;p=thirdparty%2Fsamba.git s3: VFS: default: Remove recursion into the VFS inside the default pread call. We already know we're at the POSIX level here. Signed-off-by: Jeremy Allison Reviewed-by: Ralph Boehme --- diff --git a/source3/modules/vfs_default.c b/source3/modules/vfs_default.c index 6e8a99690cf..56dd5c77218 100644 --- a/source3/modules/vfs_default.c +++ b/source3/modules/vfs_default.c @@ -636,7 +636,7 @@ static ssize_t vfswrap_pread(vfs_handle_struct *handle, files_struct *fsp, void if (result == -1 && errno == ESPIPE) { /* Maintain the fiction that pipes can be seeked (sought?) on. */ - result = SMB_VFS_READ(fsp, data, n); + result = sys_read(fsp->fh->fd, data, n); fsp->fh->pos = 0; }