Date: Sun, 6 Jun 2021 19:39:18 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: 047905dc4299 - stable/13 - vinvalbuf: do not panic if we were unable to flush dirty buffers Message-ID: <202106061939.156JdIuv058536@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=047905dc42996fa353e149ea5afddefe877ac701 commit 047905dc42996fa353e149ea5afddefe877ac701 Author: Konstantin Belousov <kib@FreeBSD.org> AuthorDate: 2021-05-30 16:52:42 +0000 Commit: Konstantin Belousov <kib@FreeBSD.org> CommitDate: 2021-06-06 19:27:32 +0000 vinvalbuf: do not panic if we were unable to flush dirty buffers PR: 238565 (cherry picked from commit 27006229f7a40a18a61a0e8fd270bc583326b690) --- sys/kern/vfs_subr.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/sys/kern/vfs_subr.c b/sys/kern/vfs_subr.c index 5de58f979e97..3e6d11624197 100644 --- a/sys/kern/vfs_subr.c +++ b/sys/kern/vfs_subr.c @@ -1998,13 +1998,11 @@ bufobj_invalbuf(struct bufobj *bo, int flags, int slpflag, int slptimeo) } while (error == ERELOOKUP); if (error != 0) return (error); - /* - * XXX We could save a lock/unlock if this was only - * enabled under INVARIANTS - */ BO_LOCK(bo); - if (bo->bo_numoutput > 0 || bo->bo_dirty.bv_cnt > 0) - panic("vinvalbuf: dirty bufs"); + if (bo->bo_numoutput > 0 || bo->bo_dirty.bv_cnt > 0) { + BO_UNLOCK(bo); + return (EBUSY); + } } } /*
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202106061939.156JdIuv058536>