s3: VFS: default. Change pwrite() -> sys_pwrite_full() in SMB_VFS_PWRITE_SEND() to...
authorJeremy Allison <jra@samba.org>
Thu, 7 May 2020 19:48:49 +0000 (12:48 -0700)
committerJeremy Allison <jra@samba.org>
Tue, 12 May 2020 19:53:44 +0000 (19:53 +0000)
Note that as sys_pwrite_full() deals with the EINTR case
we can remove the do {} while loop here.

BUG: https://bugzilla.samba.org/show_bug.cgi?id=14361

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
source3/modules/vfs_default.c

index bce50b990c119833d03693baec15fa3ae9d2e296..386a34f81d12c6631afa5320e9480c1666f4e6ab 100644 (file)
@@ -966,10 +966,10 @@ static void vfs_pwrite_do(void *private_data)
 
        PROFILE_TIMESTAMP(&start_time);
 
-       do {
-               state->ret = pwrite(state->fd, state->buf, state->count,
-                                  state->offset);
-       } while ((state->ret == -1) && (errno == EINTR));
+       state->ret = sys_pwrite_full(state->fd,
+                                    state->buf,
+                                    state->count,
+                                    state->offset);
 
        if (state->ret == -1) {
                state->vfs_aio_state.error = errno;