From: Alan Cox Date: Fri, 13 Feb 2015 19:54:06 +0000 (+0000) Subject: inode.c: rest of the fix too X-Git-Url: https://git.ndcode.org/public/gitweb.cgi?a=commitdiff_plain;h=876e85c4426e4b3005219659bd9b7c8c55da0b09;p=FUZIX.git inode.c: rest of the fix too --- diff --git a/Kernel/inode.c b/Kernel/inode.c index cc9dee7f..7d5f68b8 100644 --- a/Kernel/inode.c +++ b/Kernel/inode.c @@ -3,9 +3,9 @@ #include #if defined(CONFIG_LARGE_IO_DIRECT) -#define read_policy_direct(dev, pblk, flag) (!udata.u_sysio) +#define read_direct(flag) (!udata.u_sysio) #elif (NBUFS >= 32) -#define read_policy_direct(dev, pblk, flag) (flag & O_DIRECT) +#define read_direct(flag) (flag & O_DIRECT) #endif /* Writei (and readi) need more i/o error handling */ @@ -60,7 +60,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 defined(read_policy_direct) +#if defined(read_direct) if (!ispipe && amount == BLKSIZE && read_direct(flag) && bfind(dev, pblk) == 0) { /* we can transfer direct from disk to the userspace buffer */ off_t uostash;