git: 047905dc4299 - stable/13 - vinvalbuf: do not panic if we were unable to flush dirty buffers
Konstantin Belousov
kib at FreeBSD.org
Sun Jun 6 19:39:18 UTC 2021
The branch stable/13 has been updated by kib:
URL: https://cgit.FreeBSD.org/src/commit/?id=047905dc42996fa353e149ea5afddefe877ac701
commit 047905dc42996fa353e149ea5afddefe877ac701
Author: Konstantin Belousov <kib at FreeBSD.org>
AuthorDate: 2021-05-30 16:52:42 +0000
Commit: Konstantin Belousov <kib at 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);
+ }
}
}
/*
More information about the dev-commits-src-all
mailing list