Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/netbsd-9]: src/sys/dev Pull up following revision(s) (requested by maxv ...
details: https://anonhg.NetBSD.org/src/rev/88a50b629049
branches: netbsd-9
changeset: 462717:88a50b629049
user: martin <martin%NetBSD.org@localhost>
date: Wed Oct 23 20:35:52 2019 +0000
description:
Pull up following revision(s) (requested by maxv in ticket #356):
sys/dev/fss.c: revision 1.108
Check fc_type before fc_cluster, because the latter may not be initialized.
This is harmless because fc_type is always initialized properly, so the
next branch wouldn't have been taken.
diffstat:
sys/dev/fss.c | 15 +++++++++------
1 files changed, 9 insertions(+), 6 deletions(-)
diffs (42 lines):
diff -r 7128fa573393 -r 88a50b629049 sys/dev/fss.c
--- a/sys/dev/fss.c Wed Oct 23 19:50:47 2019 +0000
+++ b/sys/dev/fss.c Wed Oct 23 20:35:52 2019 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: fss.c,v 1.107 2019/02/20 10:03:25 hannken Exp $ */
+/* $NetBSD: fss.c,v 1.107.4.1 2019/10/23 20:35:52 martin Exp $ */
/*-
* Copyright (c) 2003 The NetBSD Foundation, Inc.
@@ -36,7 +36,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: fss.c,v 1.107 2019/02/20 10:03:25 hannken Exp $");
+__KERNEL_RCSID(0, "$NetBSD: fss.c,v 1.107.4.1 2019/10/23 20:35:52 martin Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -992,16 +992,19 @@
return 0;
}
- for (scp = sc->sc_cache; scp < scl; scp++)
- if (scp->fc_cluster == cl) {
- if (scp->fc_type == FSS_CACHE_VALID) {
+ for (scp = sc->sc_cache; scp < scl; scp++) {
+ if (scp->fc_type == FSS_CACHE_VALID) {
+ if (scp->fc_cluster == cl) {
mutex_exit(&sc->sc_slock);
return 0;
- } else if (scp->fc_type == FSS_CACHE_BUSY) {
+ }
+ } else if (scp->fc_type == FSS_CACHE_BUSY) {
+ if (scp->fc_cluster == cl) {
cv_wait(&scp->fc_state_cv, &sc->sc_slock);
goto restart;
}
}
+ }
for (scp = sc->sc_cache; scp < scl; scp++)
if (scp->fc_type == FSS_CACHE_FREE) {
Home |
Main Index |
Thread Index |
Old Index