kernel/fs: Fallback in vfs_request_io if read_pages/write_pages aren't available.

Add a comment indicating why we don't call them unconditionally.

Fixes #19642.
This commit is contained in:
Augustin Cavalier
2025-09-03 17:02:56 -04:00
parent 2199532364
commit 5da70510b3
+6
View File
@@ -119,11 +119,17 @@ public:
vec.iov_base = buffer;
vec.iov_len = *length;
// We need to use write_pages (if it exists) to bypass caches.
if (fWrite) {
if (!HAS_FS_CALL(fVnode, write_pages))
return FS_CALL(fVnode, write, fCookie, offset, buffer, length);
return FS_CALL(fVnode, write_pages, fCookie, offset, &vec, 1,
length);
}
if (!HAS_FS_CALL(fVnode, read_pages))
return FS_CALL(fVnode, read, fCookie, offset, buffer, length);
return FS_CALL(fVnode, read_pages, fCookie, offset, &vec, 1, length);
}