Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/ufs/ffs ffs_reload(): release 'bp' earlier
details: https://anonhg.NetBSD.org/src/rev/1dd3a18d1989
branches: trunk
changeset: 336493:1dd3a18d1989
user: maxv <maxv%NetBSD.org@localhost>
date: Tue Mar 03 17:56:51 2015 +0000
description:
ffs_reload(): release 'bp' earlier
diffstat:
sys/ufs/ffs/ffs_vfsops.c | 10 ++++------
1 files changed, 4 insertions(+), 6 deletions(-)
diffs (51 lines):
diff -r e89de08027d5 -r 1dd3a18d1989 sys/ufs/ffs/ffs_vfsops.c
--- a/sys/ufs/ffs/ffs_vfsops.c Tue Mar 03 17:46:39 2015 +0000
+++ b/sys/ufs/ffs/ffs_vfsops.c Tue Mar 03 17:56:51 2015 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ffs_vfsops.c,v 1.320 2015/03/03 17:46:39 maxv Exp $ */
+/* $NetBSD: ffs_vfsops.c,v 1.321 2015/03/03 17:56:51 maxv Exp $ */
/*-
* Copyright (c) 2008, 2009 The NetBSD Foundation, Inc.
@@ -61,7 +61,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ffs_vfsops.c,v 1.320 2015/03/03 17:46:39 maxv Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ffs_vfsops.c,v 1.321 2015/03/03 17:56:51 maxv Exp $");
#if defined(_KERNEL_OPT)
#include "opt_ffs.h"
@@ -733,14 +733,14 @@
#endif
fs->fs_flags &= ~FS_SWAPPED;
+ brelse(bp, 0);
+
if ((newfs->fs_magic != FS_UFS1_MAGIC &&
newfs->fs_magic != FS_UFS2_MAGIC)) {
- brelse(bp, 0);
kmem_free(newfs, fs_sbsize);
return (EIO); /* XXX needs translation */
}
if (!ffs_superblock_validate(newfs)) {
- brelse(bp, 0);
kmem_free(newfs, fs_sbsize);
return (EINVAL);
}
@@ -753,7 +753,6 @@
(newfs->fs_cssize != fs->fs_cssize) ||
(newfs->fs_contigsumsize != fs->fs_contigsumsize) ||
(newfs->fs_ncg != fs->fs_ncg)) {
- brelse(bp, 0);
kmem_free(newfs, fs_sbsize);
return (EINVAL);
}
@@ -772,7 +771,6 @@
newfs->fs_ronly = fs->fs_ronly;
newfs->fs_active = fs->fs_active;
memcpy(fs, newfs, (u_int)fs_sbsize);
- brelse(bp, 0);
kmem_free(newfs, fs_sbsize);
/* Recheck for apple UFS filesystem */
Home |
Main Index |
Thread Index |
Old Index