From 2c8ad7ab3eb4e0bfc2abb5c41de3d531b9bea802 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Axel=20D=C3=B6rfler?= Date: Mon, 27 Jul 2009 14:38:29 +0000 Subject: [PATCH] * If the fs_io() hook failed, we need to check if the request has been notified about it (there is also no public API to do that in the FS yet). * This could have caused bug #2719, although the specific reason why the FS hook failed remains unknown. At least it won't hang in this case anymore. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31809 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- src/system/kernel/fs/vfs_request_io.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/system/kernel/fs/vfs_request_io.cpp b/src/system/kernel/fs/vfs_request_io.cpp index 7c0d634e46..a2efa11a06 100644 --- a/src/system/kernel/fs/vfs_request_io.cpp +++ b/src/system/kernel/fs/vfs_request_io.cpp @@ -410,6 +410,11 @@ vfs_vnode_io(struct vnode* vnode, void* cookie, io_request* request) return synchronous_io(request, io); } + if (result != B_OK && !request->IsFinished()) { + // The request failed, but its owner has not been notified yet + request->SetStatusAndNotify(result); + } + return result; }