Kernel: readi(): respect u_sysio flag
authorWill Sowerbutts <will@sowerbutts.com>
Thu, 12 Feb 2015 13:55:24 +0000 (13:55 +0000)
committerWill Sowerbutts <will@sowerbutts.com>
Fri, 13 Feb 2015 15:31:30 +0000 (15:31 +0000)
Kernel/inode.c

index d0ae1a8..22e883a 100644 (file)
@@ -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 */