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
This commit is contained in:
@@ -1072,11 +1072,15 @@ checksumfs_io(fs_volume* fsVolume, fs_vnode* vnode, void* cookie,
|
||||
{
|
||||
Volume* volume = (Volume*)fsVolume->private_volume;
|
||||
File* file = dynamic_cast<File*>((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();
|
||||
|
||||
Reference in New Issue
Block a user