From 0d8b6aab965b291f5e18818615b14b969cf49f4a Mon Sep 17 00:00:00 2001 From: Will Sowerbutts Date: Thu, 12 Feb 2015 13:55:24 +0000 Subject: [PATCH] Kernel: readi(): respect u_sysio flag --- Kernel/inode.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Kernel/inode.c b/Kernel/inode.c index d0ae1a83..22e883a1 100644 --- a/Kernel/inode.c +++ b/Kernel/inode.c @@ -56,7 +56,7 @@ void readi(inoptr ino, uint8_t flag) amount = min(toread, BLKSIZE - (udata.u_offset&BLKMASK)); pblk = bmap(ino, udata.u_offset >> BLKSHIFT, 1); - if(!ispipe && amount == BLKSIZE && bfind(dev, pblk) == 0){ + if(!ispipe && amount == BLKSIZE && !udata.u_sysio && bfind(dev, pblk) == 0){ /* we can transfer direct from disk to the userspace buffer */ uostash = udata.u_offset; /* stash file offset */ ucstash = udata.u_count; /* stash byte count */ -- 2.34.1