git: b72f9bfc4513 - main - statfs(2): allow to interrupt busying

Konstantin Belousov <[email protected]> Wed, 29 Jul 2026 05:20:42 +0000
Newsgroups gmane.os.freebsd.devel.cvs.src
Message-ID <6a698daa.339bf.3c8bef69__31470.4230566107$1785302463$gmane$org@gitrepo.freebsd.org>
The branch main has been updated by kib:

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

commit b72f9bfc4513e3e286fb3fc2d07ebdd94ed7ac57
Author:     Konstantin Belousov <[email protected]>
AuthorDate: 2026-07-27 13:41:09 +0000
Commit:     Konstantin Belousov <[email protected]>
CommitDate: 2026-07-29 05:20:12 +0000

    statfs(2): allow to interrupt busying
    
    There are probably more places which could benefit from allowing to
    interrupt vfs_busy() calls at syscalls top level.
    
    Requested by:   Peter Eriksson <[email protected]>
    Reviewed by:    jah, markj
    Sponsored by:   The FreeBSD Foundation
    MFC after:      1 week
    Differential revision:  https://reviews.freebsd.org/D58477
---
 sys/kern/vfs_syscalls.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sys/kern/vfs_syscalls.c b/sys/kern/vfs_syscalls.c
index eeee67418877..e82ac8fe9ead 100644
--- a/sys/kern/vfs_syscalls.c
+++ b/sys/kern/vfs_syscalls.c
@@ -278,7 +278,7 @@ kern_do_statfs(struct thread *td, struct mount *mp, struct statfs *buf)
 
 	if (mp == NULL)
 		return (EBADF);
-	error = vfs_busy(mp, 0);
+	error = vfs_busy(mp, MBF_PCATCH);
 	vfs_rel(mp);
 	if (error != 0)
 		return (error);