s3: VFS: default: Remove recursion into the VFS inside the default pwrite call.
authorJeremy Allison <jra@samba.org>
Wed, 2 May 2018 23:38:05 +0000 (16:38 -0700)
committerRalph Boehme <slow@samba.org>
Fri, 4 May 2018 20:34:25 +0000 (22:34 +0200)
We already know we're at the POSIX level here.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
source3/modules/vfs_default.c

index 63252ea865b1780d8f4d3a0ab993206fc6b0d3dd..0fa9b78b46ef1a09d71d1388965dcf81579ad93c 100644 (file)
@@ -660,7 +660,7 @@ static ssize_t vfswrap_pwrite(vfs_handle_struct *handle, files_struct *fsp, cons
 
        if (result == -1 && errno == ESPIPE) {
                /* Maintain the fiction that pipes can be sought on. */
-               result = SMB_VFS_WRITE(fsp, data, n);
+               result = sys_write(fsp->fh->fd, data, n);
        }
 
 #else /* HAVE_PWRITE */