Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/fs/msdosfs Revert rev. 1.20 now that bread() has been fi...
details: https://anonhg.NetBSD.org/src/rev/8f545880f72b
branches: trunk
changeset: 783428:8f545880f72b
user: hannken <hannken%NetBSD.org@localhost>
date: Thu Dec 20 11:44:39 2012 +0000
description:
Revert rev. 1.20 now that bread() has been fixed.
PR kern/46282 (6.0_BETA crash: msdosfs_bmap -> pcbmap -> bread -> bio_doread)
diffstat:
sys/fs/msdosfs/msdosfs_fat.c | 28 ++++++----------------------
1 files changed, 6 insertions(+), 22 deletions(-)
diffs (49 lines):
diff -r a26a48c9b422 -r 8f545880f72b sys/fs/msdosfs/msdosfs_fat.c
--- a/sys/fs/msdosfs/msdosfs_fat.c Thu Dec 20 11:17:47 2012 +0000
+++ b/sys/fs/msdosfs/msdosfs_fat.c Thu Dec 20 11:44:39 2012 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: msdosfs_fat.c,v 1.22 2012/12/20 08:03:42 hannken Exp $ */
+/* $NetBSD: msdosfs_fat.c,v 1.23 2012/12/20 11:44:39 hannken Exp $ */
/*-
* Copyright (C) 1994, 1995, 1997 Wolfgang Solfrank.
@@ -48,7 +48,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: msdosfs_fat.c,v 1.22 2012/12/20 08:03:42 hannken Exp $");
+__KERNEL_RCSID(0, "$NetBSD: msdosfs_fat.c,v 1.23 2012/12/20 11:44:39 hannken Exp $");
/*
* kernel include files.
@@ -254,26 +254,10 @@
if (bn != bp_bn) {
if (bp)
brelse(bp, 0);
- bp = getblk(pmp->pm_devvp, de_bn2kb(pmp, bn), bsize,
- 0, 0);
- if (bp == NULL) {
- /*
- * getblk() above returns NULL only iff we are
- * pagedaemon. See the implementation of getblk
- * for detail.
- */
- return ENOMEM;
- }
- if (!ISSET(bp->b_oflags, (BO_DONE | BO_DELWRI))) {
- SET(bp->b_flags, B_READ);
- BIO_SETPRIO(bp, BPRIO_TIMECRITICAL);
- VOP_STRATEGY(pmp->pm_devvp, bp);
- curlwp->l_ru.ru_inblock++;
- error = biowait(bp);
- if (error) {
- brelse(bp, 0);
- return error;
- }
+ error = bread(pmp->pm_devvp, de_bn2kb(pmp, bn), bsize,
+ NOCRED, 0, &bp);
+ if (error) {
+ return (error);
}
bp_bn = bn;
}
Home |
Main Index |
Thread Index |
Old Index