Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/ufs/ffs Stay at splbio across the VBWAIT loop, as is don...
details: https://anonhg.NetBSD.org/src/rev/f488bf7f727e
branches: trunk
changeset: 498437:f488bf7f727e
user: fvdl <fvdl%NetBSD.org@localhost>
date: Tue Oct 24 14:43:32 2000 +0000
description:
Stay at splbio across the VBWAIT loop, as is done elsewhere in the
kernel. Avoids a possible race condition. Pointed out by
enami%netbsd.org@localhost, problem reported by deberg%netbsd.org@localhost.
diffstat:
sys/ufs/ffs/ffs_vnops.c | 8 +++-----
1 files changed, 3 insertions(+), 5 deletions(-)
diffs (43 lines):
diff -r 55405bce917b -r f488bf7f727e sys/ufs/ffs/ffs_vnops.c
--- a/sys/ufs/ffs/ffs_vnops.c Tue Oct 24 12:18:33 2000 +0000
+++ b/sys/ufs/ffs/ffs_vnops.c Tue Oct 24 14:43:32 2000 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ffs_vnops.c,v 1.33 2000/09/19 22:04:10 fvdl Exp $ */
+/* $NetBSD: ffs_vnops.c,v 1.34 2000/10/24 14:43:32 fvdl Exp $ */
/*
* Copyright (c) 1982, 1986, 1989, 1993
@@ -277,8 +277,6 @@
goto loop;
}
- splx(s);
-
/*
* Then, flush possibly unwritten indirect blocks. Without softdeps,
* these should be the only ones left.
@@ -287,7 +285,6 @@
error = ufs_getlbns(vp, blk_high, ia, &num);
if (error != 0)
return error;
- s = splbio();
for (i = 0; i < num; i++) {
ibp = incore(vp, ia[i].in_lbn);
if (ibp != NULL && !(ibp->b_flags & B_BUSY) &&
@@ -298,7 +295,6 @@
s = splbio();
}
}
- splx(s);
}
if (ap->a_flags & FSYNC_WAIT) {
@@ -309,6 +305,8 @@
}
}
+ splx(s);
+
return (VOP_UPDATE(vp, NULL, NULL,
(ap->a_flags & FSYNC_WAIT) ? UPDATE_WAIT : 0));
}
Home |
Main Index |
Thread Index |
Old Index