Module Name: src Committed By: maya Date: Mon Jun 5 01:29:21 UTC 2017
Modified Files: src/sys/ufs/lfs: lfs_inode.c lfs_pages.c lfs_vnops.c Log Message: Correct confusion between i_flag and i_flags These will have to be renamed. Spotted by Riastradh, thanks! To generate a diff of this commit: cvs rdiff -u -r1.155 -r1.156 src/sys/ufs/lfs/lfs_inode.c cvs rdiff -u -r1.12 -r1.13 src/sys/ufs/lfs/lfs_pages.c cvs rdiff -u -r1.315 -r1.316 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_inode.c diff -u src/sys/ufs/lfs/lfs_inode.c:1.155 src/sys/ufs/lfs/lfs_inode.c:1.156 --- src/sys/ufs/lfs/lfs_inode.c:1.155 Sat Apr 1 00:40:42 2017 +++ src/sys/ufs/lfs/lfs_inode.c Mon Jun 5 01:29:21 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: lfs_inode.c,v 1.155 2017/04/01 00:40:42 maya Exp $ */ +/* $NetBSD: lfs_inode.c,v 1.156 2017/06/05 01:29:21 maya 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_inode.c,v 1.155 2017/04/01 00:40:42 maya Exp $"); +__KERNEL_RCSID(0, "$NetBSD: lfs_inode.c,v 1.156 2017/06/05 01:29:21 maya Exp $"); #if defined(_KERNEL_OPT) #include "opt_quota.h" @@ -592,8 +592,8 @@ done: /* * If we truncated to zero, take us off the paging queue. */ - if (oip->i_size == 0 && oip->i_flags & IN_PAGING) { - oip->i_flags &= ~IN_PAGING; + if (oip->i_size == 0 && oip->i_flag & IN_PAGING) { + oip->i_flag &= ~IN_PAGING; TAILQ_REMOVE(&fs->lfs_pchainhd, oip, i_lfs_pchain); } mutex_exit(&lfs_lock); Index: src/sys/ufs/lfs/lfs_pages.c diff -u src/sys/ufs/lfs/lfs_pages.c:1.12 src/sys/ufs/lfs/lfs_pages.c:1.13 --- src/sys/ufs/lfs/lfs_pages.c:1.12 Sun Jun 4 08:05:42 2017 +++ src/sys/ufs/lfs/lfs_pages.c Mon Jun 5 01:29:21 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: lfs_pages.c,v 1.12 2017/06/04 08:05:42 hannken Exp $ */ +/* $NetBSD: lfs_pages.c,v 1.13 2017/06/05 01:29:21 maya 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_pages.c,v 1.12 2017/06/04 08:05:42 hannken Exp $"); +__KERNEL_RCSID(0, "$NetBSD: lfs_pages.c,v 1.13 2017/06/05 01:29:21 maya Exp $"); #ifdef _KERNEL_OPT #include "opt_compat_netbsd.h" @@ -506,8 +506,8 @@ retry: /* Remove us from paging queue, if we were on it */ mutex_enter(&lfs_lock); - if (ip->i_flags & IN_PAGING) { - ip->i_flags &= ~IN_PAGING; + if (ip->i_flag & IN_PAGING) { + ip->i_flag &= ~IN_PAGING; TAILQ_REMOVE(&fs->lfs_pchainhd, ip, i_lfs_pchain); } mutex_exit(&lfs_lock); @@ -688,8 +688,8 @@ retry: if (pagedaemon) { mutex_exit(vp->v_interlock); mutex_enter(&lfs_lock); - if (!(ip->i_flags & IN_PAGING)) { - ip->i_flags |= IN_PAGING; + if (!(ip->i_flag & IN_PAGING)) { + ip->i_flag |= IN_PAGING; TAILQ_INSERT_TAIL(&fs->lfs_pchainhd, ip, i_lfs_pchain); } cv_broadcast(&lfs_writerd_cv); @@ -898,8 +898,8 @@ retry: */ if (origendoffset == 0 || ap->a_flags & PGO_ALLPAGES) { mutex_enter(&lfs_lock); - if (ip->i_flags & IN_PAGING) { - ip->i_flags &= ~IN_PAGING; + if (ip->i_flag & IN_PAGING) { + ip->i_flag &= ~IN_PAGING; TAILQ_REMOVE(&fs->lfs_pchainhd, ip, i_lfs_pchain); } mutex_exit(&lfs_lock); Index: src/sys/ufs/lfs/lfs_vnops.c diff -u src/sys/ufs/lfs/lfs_vnops.c:1.315 src/sys/ufs/lfs/lfs_vnops.c:1.316 --- src/sys/ufs/lfs/lfs_vnops.c:1.315 Fri May 26 14:21:02 2017 +++ src/sys/ufs/lfs/lfs_vnops.c Mon Jun 5 01:29:21 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: lfs_vnops.c,v 1.315 2017/05/26 14:21:02 riastradh Exp $ */ +/* $NetBSD: lfs_vnops.c,v 1.316 2017/06/05 01:29:21 maya 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.315 2017/05/26 14:21:02 riastradh Exp $"); +__KERNEL_RCSID(0, "$NetBSD: lfs_vnops.c,v 1.316 2017/06/05 01:29:21 maya Exp $"); #ifdef _KERNEL_OPT #include "opt_compat_netbsd.h" @@ -461,8 +461,8 @@ lfs_fsync(void *v) if (ap->a_flags & FSYNC_LAZY) { if (lfs_ignore_lazy_sync == 0) { mutex_enter(&lfs_lock); - if (!(ip->i_flags & IN_PAGING)) { - ip->i_flags |= IN_PAGING; + if (!(ip->i_flag & IN_PAGING)) { + ip->i_flag |= IN_PAGING; TAILQ_INSERT_TAIL(&fs->lfs_pchainhd, ip, i_lfs_pchain); } @@ -477,7 +477,7 @@ lfs_fsync(void *v) * reuse it. This prevents the cleaner from writing files twice * in the same partial segment, causing an accounting underflow. */ - if (ap->a_flags & FSYNC_RECLAIM && ip->i_flags & IN_CLEANING) { + if (ap->a_flags & FSYNC_RECLAIM && ip->i_flag & IN_CLEANING) { lfs_vflush(vp); } @@ -1446,10 +1446,10 @@ lfs_reclaim(void *v) * We shouldn't be on them. */ mutex_enter(&lfs_lock); - if (ip->i_flags & IN_PAGING) { + if (ip->i_flag & IN_PAGING) { log(LOG_WARNING, "%s: reclaimed vnode is IN_PAGING\n", lfs_sb_getfsmnt(fs)); - ip->i_flags &= ~IN_PAGING; + ip->i_flag &= ~IN_PAGING; TAILQ_REMOVE(&fs->lfs_pchainhd, ip, i_lfs_pchain); } if (vp->v_uflag & VU_DIROP) { @@ -1776,7 +1776,7 @@ lfs_flush_pchain(struct lfs *fs) nip = TAILQ_NEXT(ip, i_lfs_pchain); - if (!(ip->i_flags & IN_PAGING)) + if (!(ip->i_flag & IN_PAGING)) goto top; mutex_exit(&lfs_lock); @@ -1792,7 +1792,7 @@ lfs_flush_pchain(struct lfs *fs) ip = VTOI(vp); mutex_enter(&lfs_lock); if ((vp->v_uflag & VU_DIROP) != 0 || vp->v_type != VREG || - !(ip->i_flags & IN_PAGING)) { + !(ip->i_flag & IN_PAGING)) { mutex_exit(&lfs_lock); vput(vp); mutex_enter(&lfs_lock);