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(): fix a bug that prevents Big Endian...
details: https://anonhg.NetBSD.org/src/rev/0988c589764e
branches: trunk
changeset: 806877:0988c589764e
user: maxv <maxv%NetBSD.org@localhost>
date: Sun Mar 15 09:21:01 2015 +0000
description:
ffs_reload(): fix a bug that prevents Big Endian FSes from being reloaded.
'newfs' should be tagged as FS_SWAPPED, not 'fs'.
Was here before my changes.
While here, also KNF a bit.
diffstat:
sys/ufs/ffs/ffs_vfsops.c | 15 +++++++--------
1 files changed, 7 insertions(+), 8 deletions(-)
diffs (48 lines):
diff -r bf74b425de74 -r 0988c589764e sys/ufs/ffs/ffs_vfsops.c
--- a/sys/ufs/ffs/ffs_vfsops.c Sun Mar 15 04:12:07 2015 +0000
+++ b/sys/ufs/ffs/ffs_vfsops.c Sun Mar 15 09:21:01 2015 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ffs_vfsops.c,v 1.323 2015/03/14 19:52:54 maxv Exp $ */
+/* $NetBSD: ffs_vfsops.c,v 1.324 2015/03/15 09:21:01 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.323 2015/03/14 19:52:54 maxv Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ffs_vfsops.c,v 1.324 2015/03/15 09:21:01 maxv Exp $");
#if defined(_KERNEL_OPT)
#include "opt_ffs.h"
@@ -727,16 +727,16 @@
#ifdef FFS_EI
if (ump->um_flags & UFS_NEEDSWAP) {
- ffs_sb_swap((struct fs*)bp->b_data, newfs);
- fs->fs_flags |= FS_SWAPPED;
+ ffs_sb_swap((struct fs *)bp->b_data, newfs);
+ newfs->fs_flags |= FS_SWAPPED;
} else
#endif
- fs->fs_flags &= ~FS_SWAPPED;
+ newfs->fs_flags &= ~FS_SWAPPED;
brelse(bp, 0);
- if ((newfs->fs_magic != FS_UFS1_MAGIC &&
- newfs->fs_magic != FS_UFS2_MAGIC)) {
+ if ((newfs->fs_magic != FS_UFS1_MAGIC) &&
+ (newfs->fs_magic != FS_UFS2_MAGIC)) {
kmem_free(newfs, fs_sbsize);
return (EIO); /* XXX needs translation */
}
@@ -757,7 +757,6 @@
return (EINVAL);
}
-
/* Store off old fs_sblockloc for fs_oldfscompat_read. */
sblockloc = fs->fs_sblockloc;
/*
Home |
Main Index |
Thread Index |
Old Index