Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 7 Feb 2022 09:50:51 GMT
From:      Konstantin Belousov <kib@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org
Subject:   git: 4116ae3ece6e - stable/13 - buf_alloc(): lock the buffer with LK_NOWAIT
Message-ID:  <202202070950.2179opHG058983@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch stable/13 has been updated by kib:

URL: https://cgit.FreeBSD.org/src/commit/?id=4116ae3ece6ecf565e89d377f9f98c5dda2b53dd

commit 4116ae3ece6ecf565e89d377f9f98c5dda2b53dd
Author:     Konstantin Belousov <kib@FreeBSD.org>
AuthorDate: 2022-01-18 01:39:05 +0000
Commit:     Konstantin Belousov <kib@FreeBSD.org>
CommitDate: 2022-02-07 09:38:49 +0000

    buf_alloc(): lock the buffer with LK_NOWAIT
    
    (cherry picked from commit 5875b94c74935affb47c7e059011f80ee2f6bf67)
---
 sys/kern/vfs_bio.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sys/kern/vfs_bio.c b/sys/kern/vfs_bio.c
index aaf7b69d47db..4491033d44eb 100644
--- a/sys/kern/vfs_bio.c
+++ b/sys/kern/vfs_bio.c
@@ -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;



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202202070950.2179opHG058983>