Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F140120701
D25898.id75191.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D25898.id75191.diff
View Options
Index: head/sys/kern/vfs_bio.c
===================================================================
--- head/sys/kern/vfs_bio.c
+++ head/sys/kern/vfs_bio.c
@@ -3844,7 +3844,7 @@
struct buf *bp;
struct bufobj *bo;
daddr_t d_blkno;
- int bsize, error, maxsize, vmio, lockflags;
+ int bsize, error, maxsize, vmio;
off_t offset;
CTR3(KTR_BUF, "getblk(%p, %ld, %d)", vp, (long)blkno, size);
@@ -3865,14 +3865,9 @@
if (bp == NULL)
goto newbuf_unlocked;
- lockflags = LK_EXCLUSIVE | LK_SLEEPFAIL |
- ((flags & GB_LOCK_NOWAIT) ? LK_NOWAIT : 0);
-
- error = BUF_TIMELOCK(bp, lockflags, NULL, "getblku", slpflag,
- slptimeo);
- if (error == EINTR || error == ERESTART)
- return (error);
- else if (error != 0)
+ error = BUF_TIMELOCK(bp, LK_EXCLUSIVE | LK_NOWAIT, NULL, "getblku", 0,
+ 0);
+ if (error != 0)
goto loop;
/* Verify buf identify has not changed since lookup. */
@@ -3886,6 +3881,8 @@
BO_RLOCK(bo);
bp = gbincore(bo, blkno);
if (bp != NULL) {
+ int lockflags;
+
/*
* Buffer is in-core. If the buffer is not busy nor managed,
* it must be on a queue.
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sun, Dec 21, 12:38 PM (7 h, 37 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
27113083
Default Alt Text
D25898.id75191.diff (1 KB)
Attached To
Mode
D25898: getblk: Avoid sleeping on wrong buf in lockless path
Attached
Detach File
Event Timeline
Log In to Comment