diff --git a/patches/kernel32-SetFileCompletionNotificationModes/0006-server-Skip-async-completion-when-possible.patch b/patches/kernel32-SetFileCompletionNotificationModes/0006-server-Skip-async-completion-when-possible.patch index 23bc2ee9..ba16947a 100644 --- a/patches/kernel32-SetFileCompletionNotificationModes/0006-server-Skip-async-completion-when-possible.patch +++ b/patches/kernel32-SetFileCompletionNotificationModes/0006-server-Skip-async-completion-when-possible.patch @@ -1,4 +1,4 @@ -From 91a2f667bd20e9f4da38f2a3ee2a189a18d8bb0e Mon Sep 17 00:00:00 2001 +From 9fc1b0617a1bf5136389984b9931ab92a42e56dc Mon Sep 17 00:00:00 2001 From: Sebastian Lackner Date: Sun, 9 Apr 2017 03:13:25 +0200 Subject: server: Skip async completion when possible. @@ -25,7 +25,7 @@ index 6846b514dc2..a6f8135624a 100644 CloseHandle(ov.hEvent); diff --git a/server/async.c b/server/async.c -index d1cea9a607e..bb3bc325c38 100644 +index f50cdc5a45a..d222287c30b 100644 --- a/server/async.c +++ b/server/async.c @@ -45,6 +45,7 @@ struct async @@ -36,7 +36,7 @@ index d1cea9a607e..bb3bc325c38 100644 struct event *event; async_data_t data; /* data for async I/O call */ struct iosb *iosb; /* I/O status block */ -@@ -165,6 +166,14 @@ static void async_queue_destroy( struct object *obj ) +@@ -180,6 +181,14 @@ static void async_queue_destroy( struct object *obj ) if (async_queue->completion) release_object( async_queue->completion ); } @@ -51,15 +51,15 @@ index d1cea9a607e..bb3bc325c38 100644 /* notifies client thread of new status of its async request */ void async_terminate( struct async *async, unsigned int status ) { -@@ -262,6 +271,7 @@ struct async *create_async( struct thread *thread, const async_data_t *data, str - async->timeout = NULL; +@@ -278,6 +287,7 @@ struct async *create_async( struct thread *thread, const async_data_t *data, str async->queue = NULL; async->signaled = 0; + async->wait_handle = 0; + async->skip_completion = 0; if (iosb) async->iosb = (struct iosb *)grab_object( iosb ); else async->iosb = NULL; -@@ -340,7 +350,7 @@ void async_set_result( struct object *obj, unsigned int status, apc_param_t tota +@@ -384,7 +394,7 @@ void async_set_result( struct object *obj, unsigned int status, apc_param_t tota async->status = status; if (status == STATUS_MORE_PROCESSING_REQUIRED) return; /* don't report the completion */ @@ -69,7 +69,7 @@ index d1cea9a607e..bb3bc325c38 100644 if (async->data.apc) { diff --git a/server/fd.c b/server/fd.c -index 7a876917fdd..3d62bae5b84 100644 +index a2640468644..75cb9bff945 100644 --- a/server/fd.c +++ b/server/fd.c @@ -2381,6 +2381,7 @@ DECL_HANDLER(flush) @@ -82,7 +82,7 @@ index 7a876917fdd..3d62bae5b84 100644 release_object( fd ); @@ -2457,6 +2458,7 @@ DECL_HANDLER(read) { - reply->wait = fd->fd_ops->read( fd, async, req->pos ); + reply->wait = async_handoff( async, fd->fd_ops->read( fd, async, req->pos ) ); reply->options = fd->options; + async_skip_completion( async, fd->comp_flags ); release_object( async ); @@ -105,10 +105,10 @@ index 7a876917fdd..3d62bae5b84 100644 } release_object( iosb ); diff --git a/server/file.h b/server/file.h -index 30db87e3ac7..aa70908a8a1 100644 +index 8cc4d3beab2..f4482982cfe 100644 --- a/server/file.h +++ b/server/file.h -@@ -182,6 +182,7 @@ extern void async_set_timeout( struct async *async, timeout_t timeout, unsigned +@@ -183,6 +183,7 @@ extern void async_set_timeout( struct async *async, timeout_t timeout, unsigned extern void async_set_result( struct object *obj, unsigned int status, apc_param_t total ); extern int async_queued( struct async_queue *queue ); extern int async_waiting( struct async_queue *queue ); diff --git a/patches/patchinstall.sh b/patches/patchinstall.sh index c4dce4dd..d3902c74 100755 --- a/patches/patchinstall.sh +++ b/patches/patchinstall.sh @@ -52,7 +52,7 @@ usage() # Get the upstream commit sha upstream_commit() { - echo "08df007e802dfa2845a5b4f33bbf8a04202258bb" + echo "0e0834ae92291e9857ed01f3cb116240abda642b" } # Show version information