Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F151165310
D28375.id.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
547 B
Referenced Files
None
Subscribers
None
D28375.id.diff
View Options
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
Details
Attached
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)
Attached To
Mode
D28375: Fix getblk() with GB_NOCREAT returning false-negatives.
Attached
Detach File
Event Timeline
Log In to Comment