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)
committerKarolin Seeger <kseeger@samba.org>
Thu, 14 May 2020 07:25:45 +0000 (07:25 +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>
(cherry picked from commit 801c06f4c9400343b72cad998086288931f7c6b3)

source3/modules/vfs_default.c

index 809c9b3d92f8546151a4b14a1ce021357fd75115..4cf553411cb7ebfaea1174f37071cf0e94a3d77c 100644 (file)
@@ -971,10 +971,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;