inode: fix silly bug in direct I/O fix attempt
authorAlan Cox <alan@linux.intel.com>
Mon, 23 Apr 2018 22:31:51 +0000 (23:31 +0100)
committerAlan Cox <alan@linux.intel.com>
Mon, 23 Apr 2018 22:31:51 +0000 (23:31 +0100)
Maybe this time it'll actually work

Kernel/inode.c

index 9e3dacf..b98a738 100644 (file)
@@ -95,7 +95,7 @@ void readi(regptr inoptr ino, uint8_t flag)
 #if !defined(read_direct)
                        bp = NULL;
 #else
-                       if (pblk != NULLBLK && (bp = bfind(dev, pblk)) == NULL && !ispipe && amount == BLKSIZE && read_direct(flag) == 0) {
+                       if (pblk != NULLBLK && (bp = bfind(dev, pblk)) == NULL && !ispipe && amount == BLKSIZE && read_direct(flag)) {
                                /* we can transfer direct from disk to the userspace buffer */
                                /* FIXME: allow for async queued I/O here. We want
                                   an API something like breadasync() that either