Skip to content

Commit

Permalink
buf_alloc(): lock the buffer with LK_NOWAIT
Browse files Browse the repository at this point in the history
(cherry picked from commit 5875b94)
  • Loading branch information
kostikbel committed Feb 7, 2022
1 parent 78d27f2 commit 4116ae3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion sys/kern/vfs_bio.c
Original file line number Diff line number Diff line change
Expand Up @@ -1709,7 +1709,7 @@ buf_alloc(struct bufdomain *bd)
if (freebufs == bd->bd_lofreebuffers)
bufspace_daemon_wakeup(bd);

error = BUF_LOCK(bp, LK_EXCLUSIVE, NULL);
error = BUF_LOCK(bp, LK_EXCLUSIVE | LK_NOWAIT, NULL);
KASSERT(error == 0, ("%s: BUF_LOCK on free buf %p: %d.", __func__, bp,
error));
(void)error;
Expand Down

0 comments on commit 4116ae3

Please sign in to comment.