Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/fs/msdosfs On broken filesystems the fillinmap inner loo...



details:   https://anonhg.NetBSD.org/src/rev/6c13de85d3fc
branches:  trunk
changeset: 751168:6c13de85d3fc
user:      joerg <joerg%NetBSD.org@localhost>
date:      Tue Jan 26 20:25:52 2010 +0000

description:
On broken filesystems the fillinmap inner loop may have never read a
block, so don't try to release it if bp==NULL.

diffstat:

 sys/fs/msdosfs/msdosfs_fat.c |  7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)

diffs (28 lines):

diff -r 4044ba7b9d74 -r 6c13de85d3fc sys/fs/msdosfs/msdosfs_fat.c
--- a/sys/fs/msdosfs/msdosfs_fat.c      Tue Jan 26 19:11:00 2010 +0000
+++ b/sys/fs/msdosfs/msdosfs_fat.c      Tue Jan 26 20:25:52 2010 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: msdosfs_fat.c,v 1.18 2009/03/14 21:04:23 dsl Exp $     */
+/*     $NetBSD: msdosfs_fat.c,v 1.19 2010/01/26 20:25:52 joerg 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.18 2009/03/14 21:04:23 dsl Exp $");
+__KERNEL_RCSID(0, "$NetBSD: msdosfs_fat.c,v 1.19 2010/01/26 20:25:52 joerg Exp $");
 
 /*
  * kernel include files.
@@ -954,7 +954,8 @@
                if (readcn == 0)
                        usemap_free(pmp, cn);
        }
-       brelse(bp, 0);
+       if (bp)
+               brelse(bp, 0);
        return (0);
 }
 



Home | Main Index | Thread Index | Old Index