From ce7d747b9a85a7038932400f78b89aa75a7ee4f7 Mon Sep 17 00:00:00 2001 From: Alan Cox Date: Tue, 17 Apr 2018 23:17:28 +0100 Subject: [PATCH] inode: and a quick fixup for the fixup This is too ugly to live long term but will do for the moment while I figure out the proper way to deal with this and avoid things like the double search. Possibly we need a unified 'bread' related operation that gets the contents of a buffer into user space, by any means needed. Something like bp = bfind(...) if (bp || !user) { if (bp == NULL) bread_no_lookup() update fields copy to user unlock return } issue raw copy to user page --- Kernel/inode.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Kernel/inode.c b/Kernel/inode.c index dacfb7c6..d4123439 100644 --- a/Kernel/inode.c +++ b/Kernel/inode.c @@ -123,6 +123,9 @@ void readi(regptr inoptr ino, uint8_t flag) bp = bread(dev, pblk, 0); if (bp == NULL) break; + } else { + /* FIXME: this has to get sorted ASAP */ + bp->bf_time = ++bufclock; } uputblk(bp, uoff(), amount); -- 2.34.1