From 4bfbcb535d20372f6b27214f10dd442a834c36f1 Mon Sep 17 00:00:00 2001 From: Ingo Weinhold Date: Wed, 21 Jul 2010 16:32:59 +0000 Subject: [PATCH] checksumfs_io(): We are responsible for calling notify_io_request() when we decide to fail for some reason. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37662 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- src/tests/system/kernel/file_corruption/fs/checksumfs.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/tests/system/kernel/file_corruption/fs/checksumfs.cpp b/src/tests/system/kernel/file_corruption/fs/checksumfs.cpp index edf84ccfcd..23b2d73856 100644 --- a/src/tests/system/kernel/file_corruption/fs/checksumfs.cpp +++ b/src/tests/system/kernel/file_corruption/fs/checksumfs.cpp @@ -1072,11 +1072,15 @@ checksumfs_io(fs_volume* fsVolume, fs_vnode* vnode, void* cookie, { Volume* volume = (Volume*)fsVolume->private_volume; File* file = dynamic_cast((Node*)vnode->private_node); - if (file == NULL) + if (file == NULL) { + notify_io_request(request, B_READ_ONLY_DEVICE); RETURN_ERROR(B_BAD_VALUE); + } - if (io_request_is_write(request) && volume->IsReadOnly()) + if (io_request_is_write(request) && volume->IsReadOnly()) { + notify_io_request(request, B_READ_ONLY_DEVICE); RETURN_ERROR(B_READ_ONLY_DEVICE); + } // Read-lock the file -- we'll unlock it in the finished hook. file->ReadLock();