Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/ufs/lfs Fix copy and paste errors from last commits.
details: https://anonhg.NetBSD.org/src/rev/94bdb163f209
branches: trunk
changeset: 338772:94bdb163f209
user: hannken <hannken%NetBSD.org@localhost>
date: Sun Jun 07 13:39:48 2015 +0000
description:
Fix copy and paste errors from last commits.
- Kernel i386/ALL and amd64/ALL compile again.
- Resolves CID 1304138 (DEADCODE) and 1304139 (IDENTICAL_BRANCHES).
diffstat:
sys/ufs/lfs/lfs_segment.c | 15 ++++-----------
sys/ufs/lfs/lfs_vfsops.c | 10 +++++-----
sys/ufs/lfs/lfs_vnops.c | 12 +++---------
3 files changed, 12 insertions(+), 25 deletions(-)
diffs (134 lines):
diff -r 54c6d23ed6d2 -r 94bdb163f209 sys/ufs/lfs/lfs_segment.c
--- a/sys/ufs/lfs/lfs_segment.c Sun Jun 07 12:01:41 2015 +0000
+++ b/sys/ufs/lfs/lfs_segment.c Sun Jun 07 13:39:48 2015 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: lfs_segment.c,v 1.240 2015/05/31 15:48:03 hannken Exp $ */
+/* $NetBSD: lfs_segment.c,v 1.241 2015/06/07 13:39:48 hannken Exp $ */
/*-
* Copyright (c) 1999, 2000, 2001, 2002, 2003 The NetBSD Foundation, Inc.
@@ -60,7 +60,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: lfs_segment.c,v 1.240 2015/05/31 15:48:03 hannken Exp $");
+__KERNEL_RCSID(0, "$NetBSD: lfs_segment.c,v 1.241 2015/06/07 13:39:48 hannken Exp $");
#define _VFS_VNODE_PRIVATE /* XXX: check for VI_MARKER, this has to go */
@@ -479,7 +479,7 @@
{
struct inode *ip;
struct vnode *vp;
- int inodes_written = 0, only_cleaning;
+ int inodes_written = 0;
int error = 0;
ASSERT_SEGLOCK(fs);
@@ -547,14 +547,10 @@
continue;
}
- only_cleaning = 0;
/*
* Write the inode/file if dirty and it's not the IFILE.
*/
if ((ip->i_flag & IN_ALLMOD) || !VPISEMPTY(vp)) {
- only_cleaning =
- ((ip->i_flag & IN_ALLMOD) == IN_CLEANING);
-
if (ip->i_number != LFS_IFILE_INUM) {
error = lfs_writefile(fs, sp, vp);
if (error) {
@@ -598,10 +594,7 @@
}
}
- if (lfs_clean_vnhead && only_cleaning)
- vrele(vp);
- else
- vrele(vp);
+ vrele(vp);
mutex_enter(&mntvnode_lock);
}
diff -r 54c6d23ed6d2 -r 94bdb163f209 sys/ufs/lfs/lfs_vfsops.c
--- a/sys/ufs/lfs/lfs_vfsops.c Sun Jun 07 12:01:41 2015 +0000
+++ b/sys/ufs/lfs/lfs_vfsops.c Sun Jun 07 13:39:48 2015 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: lfs_vfsops.c,v 1.324 2015/05/31 15:48:03 hannken Exp $ */
+/* $NetBSD: lfs_vfsops.c,v 1.325 2015/06/07 13:39:48 hannken Exp $ */
/*-
* Copyright (c) 1999, 2000, 2001, 2002, 2003, 2007, 2007
@@ -61,7 +61,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: lfs_vfsops.c,v 1.324 2015/05/31 15:48:03 hannken Exp $");
+__KERNEL_RCSID(0, "$NetBSD: lfs_vfsops.c,v 1.325 2015/06/07 13:39:48 hannken Exp $");
#if defined(_KERNEL_OPT)
#include "opt_lfs.h"
@@ -1720,7 +1720,7 @@
error = lfs_chkiq(ip, 1, cred, 0);
if (error) {
lfs_vfree(dvp, ino, mode);
- ffs_deinit_vnode(ump, vp);
+ lfs_deinit_vnode(ump, vp);
return error;
}
@@ -1738,10 +1738,10 @@
*/
if (ump->um_fstype == ULFS1)
ip->i_ffs1_rdev = ulfs_rw32(vap->va_rdev,
- ULFS_MPNEEDSWAP(ump));
+ ULFS_MPNEEDSWAP(fs));
else
ip->i_ffs2_rdev = ulfs_rw64(vap->va_rdev,
- ULFS_MPNEEDSWAP(ump));
+ ULFS_MPNEEDSWAP(fs));
}
lfs_vinit(mp, &vp);
diff -r 54c6d23ed6d2 -r 94bdb163f209 sys/ufs/lfs/lfs_vnops.c
--- a/sys/ufs/lfs/lfs_vnops.c Sun Jun 07 12:01:41 2015 +0000
+++ b/sys/ufs/lfs/lfs_vnops.c Sun Jun 07 13:39:48 2015 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: lfs_vnops.c,v 1.272 2015/05/31 15:48:03 hannken Exp $ */
+/* $NetBSD: lfs_vnops.c,v 1.273 2015/06/07 13:39:48 hannken Exp $ */
/*-
* Copyright (c) 1999, 2000, 2001, 2002, 2003 The NetBSD Foundation, Inc.
@@ -125,7 +125,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: lfs_vnops.c,v 1.272 2015/05/31 15:48:03 hannken Exp $");
+__KERNEL_RCSID(0, "$NetBSD: lfs_vnops.c,v 1.273 2015/06/07 13:39:48 hannken Exp $");
#ifdef _KERNEL_OPT
#include "opt_compat_netbsd.h"
@@ -784,10 +784,7 @@
}
fstrans_done(ap->a_dvp->v_mount);
- if (error != 0) {
- *vpp = NULL;
- return (error);
- }
+ KASSERT(error == 0);
VOP_UNLOCK(*vpp);
return (0);
}
@@ -1017,9 +1014,6 @@
out:
fstrans_done(dvp->v_mount);
-#if defined(LFS_QUOTA) || defined(LFS_QUOTA2)
-out2:
-#endif
UNMARK_VNODE(dvp);
UNMARK_VNODE(*vpp);
Home |
Main Index |
Thread Index |
Old Index