From 5b2dc0830774bc5375a44ded6568c50ac206c418 Mon Sep 17 00:00:00 2001 From: Jacek Caban Date: Mon, 24 Oct 2016 17:48:56 +0200 Subject: [PATCH] server: Allow caching device file handles. Signed-off-by: Jacek Caban Signed-off-by: Alexandre Julliard --- server/device.c | 2 ++ server/fd.c | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/server/device.c b/server/device.c index e4f55c7154c..0bc798af98e 100644 --- a/server/device.c +++ b/server/device.c @@ -383,6 +383,8 @@ static struct object *device_open_file( struct object *obj, unsigned int access, return NULL; } + allow_fd_caching( file->fd ); + if (device->manager) { struct irp_call *irp; diff --git a/server/fd.c b/server/fd.c index 17b1b66a367..66d34d713fc 100644 --- a/server/fd.c +++ b/server/fd.c @@ -2441,10 +2441,10 @@ DECL_HANDLER(get_handle_fd) if ((fd = get_handle_fd_obj( current->process, req->handle, 0 ))) { int unix_fd = get_unix_fd( fd ); + reply->cacheable = fd->cacheable; if (unix_fd != -1) { reply->type = fd->fd_ops->get_fd_type( fd ); - reply->cacheable = fd->cacheable; reply->options = fd->options; reply->access = get_handle_access( current->process, req->handle ); send_client_fd( current->process, unix_fd, req->handle ); -- 2.11.4.GIT