Module Name: src
Committed By: hannken
Date: Sun Jun 7 13:39:49 UTC 2015
Modified Files:
src/sys/ufs/lfs: lfs_segment.c lfs_vfsops.c lfs_vnops.c
Log Message:
Fix copy and paste errors from last commits.
- Kernel i386/ALL and amd64/ALL compile again.
- Resolves CID 1304138 (DEADCODE) and 1304139 (IDENTICAL_BRANCHES).
To generate a diff of this commit:
cvs rdiff -u -r1.240 -r1.241 src/sys/ufs/lfs/lfs_segment.c
cvs rdiff -u -r1.324 -r1.325 src/sys/ufs/lfs/lfs_vfsops.c
cvs rdiff -u -r1.272 -r1.273 src/sys/ufs/lfs/lfs_vnops.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/sys/ufs/lfs/lfs_segment.c
diff -u src/sys/ufs/lfs/lfs_segment.c:1.240 src/sys/ufs/lfs/lfs_segment.c:1.241
--- src/sys/ufs/lfs/lfs_segment.c:1.240 Sun May 31 15:48:03 2015
+++ src/sys/ufs/lfs/lfs_segment.c Sun Jun 7 13:39:48 2015
@@ -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 @@ lfs_writevnodes(struct lfs *fs, struct m
{
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 @@ lfs_writevnodes(struct lfs *fs, struct m
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 @@ lfs_writevnodes(struct lfs *fs, struct m
}
}
- if (lfs_clean_vnhead && only_cleaning)
- vrele(vp);
- else
- vrele(vp);
+ vrele(vp);
mutex_enter(&mntvnode_lock);
}
Index: src/sys/ufs/lfs/lfs_vfsops.c
diff -u src/sys/ufs/lfs/lfs_vfsops.c:1.324 src/sys/ufs/lfs/lfs_vfsops.c:1.325
--- src/sys/ufs/lfs/lfs_vfsops.c:1.324 Sun May 31 15:48:03 2015
+++ src/sys/ufs/lfs/lfs_vfsops.c Sun Jun 7 13:39:48 2015
@@ -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 @@ lfs_newvnode(struct mount *mp, struct vn
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 @@ lfs_newvnode(struct mount *mp, struct vn
*/
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);
Index: src/sys/ufs/lfs/lfs_vnops.c
diff -u src/sys/ufs/lfs/lfs_vnops.c:1.272 src/sys/ufs/lfs/lfs_vnops.c:1.273
--- src/sys/ufs/lfs/lfs_vnops.c:1.272 Sun May 31 15:48:03 2015
+++ src/sys/ufs/lfs/lfs_vnops.c Sun Jun 7 13:39:48 2015
@@ -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 @@ lfs_mknod(void *v)
}
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 @@ lfs_mkdir(void *v)
out:
fstrans_done(dvp->v_mount);
-#if defined(LFS_QUOTA) || defined(LFS_QUOTA2)
-out2:
-#endif
UNMARK_VNODE(dvp);
UNMARK_VNODE(*vpp);