Page MenuHomeFreeBSD

D28375.id.diff
No OneTemporary

D28375.id.diff

diff --git a/sys/kern/vfs_bio.c b/sys/kern/vfs_bio.c
--- a/sys/kern/vfs_bio.c
+++ b/sys/kern/vfs_bio.c
@@ -3888,8 +3888,15 @@
/* Attempt lockless lookup first. */
bp = gbincore_unlocked(bo, blkno);
- if (bp == NULL)
+ if (bp == NULL) {
+ /*
+ * With GB_NOCREAT we must be sure about not finding the buffer
+ * as it may have been reassigned during unlocked lookup.
+ */
+ if ((flags & GB_NOCREAT) != 0)
+ goto loop;
goto newbuf_unlocked;
+ }
error = BUF_TIMELOCK(bp, LK_EXCLUSIVE | LK_NOWAIT, NULL, "getblku", 0,
0);

File Metadata

Mime Type
text/plain
Expires
Tue, Apr 7, 1:12 PM (13 h, 30 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
30940746
Default Alt Text
D28375.id.diff (547 B)

Event Timeline