From f9e3e013e2045c26bd3bc003e6f0f91d21ee46e2 Mon Sep 17 00:00:00 2001 From: guenther Date: Thu, 22 May 2014 02:02:39 +0000 Subject: [PATCH] From FreeBSD: the second argument to UFS_UPDATE/ffs_update is just a boolean, not a MNT_* flag. ok beck@ --- sys/ufs/ffs/ffs_alloc.c | 6 +++--- sys/ufs/ffs/ffs_balloc.c | 6 +++--- sys/ufs/ffs/ffs_inode.c | 10 +++++----- sys/ufs/ffs/ffs_softdep.c | 6 +++--- sys/ufs/ffs/ffs_vnops.c | 4 ++-- 5 files changed, 16 insertions(+), 16 deletions(-) diff --git a/sys/ufs/ffs/ffs_alloc.c b/sys/ufs/ffs/ffs_alloc.c index a37f53fc4c3..be4a6944837 100644 --- a/sys/ufs/ffs/ffs_alloc.c +++ b/sys/ufs/ffs/ffs_alloc.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ffs_alloc.c,v 1.99 2014/01/25 23:31:12 guenther Exp $ */ +/* $OpenBSD: ffs_alloc.c,v 1.100 2014/05/22 02:02:39 guenther Exp $ */ /* $NetBSD: ffs_alloc.c,v 1.11 1996/05/11 18:27:09 mycroft Exp $ */ /* @@ -527,7 +527,7 @@ ffs1_reallocblks(void *v) } else { ip->i_flag |= IN_CHANGE | IN_UPDATE; if (!doasyncfree) { - UFS_UPDATE(ip, MNT_WAIT); + UFS_UPDATE(ip, 1); } } if (ssize < len) { @@ -741,7 +741,7 @@ ffs2_reallocblks(void *v) } else { ip->i_flag |= IN_CHANGE | IN_UPDATE; if (!doasyncfree) - ffs_update(ip, MNT_WAIT); + ffs_update(ip, 1); } if (ssize < len) { diff --git a/sys/ufs/ffs/ffs_balloc.c b/sys/ufs/ffs/ffs_balloc.c index 53847ed8938..18b25daaba0 100644 --- a/sys/ufs/ffs/ffs_balloc.c +++ b/sys/ufs/ffs/ffs_balloc.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ffs_balloc.c,v 1.40 2014/01/25 23:31:12 guenther Exp $ */ +/* $OpenBSD: ffs_balloc.c,v 1.41 2014/05/22 02:02:39 guenther Exp $ */ /* $NetBSD: ffs_balloc.c,v 1.3 1996/02/09 22:22:21 christos Exp $ */ /* @@ -835,7 +835,7 @@ fail: if (DOINGSOFTDEP(vp) && unwindidx == 0) { ip->i_flag |= IN_CHANGE | IN_UPDATE; - ffs_update(ip, MNT_WAIT); + ffs_update(ip, 1); } /* @@ -846,7 +846,7 @@ fail: *allocib = 0; ip->i_flag |= IN_CHANGE | IN_UPDATE; if (DOINGSOFTDEP(vp)) - ffs_update(ip, MNT_WAIT); + ffs_update(ip, 1); } else { r = bread(vp, indirs[unwindidx].in_lbn, (int)fs->fs_bsize, &bp); diff --git a/sys/ufs/ffs/ffs_inode.c b/sys/ufs/ffs/ffs_inode.c index 641e596e7dd..1848e583b49 100644 --- a/sys/ufs/ffs/ffs_inode.c +++ b/sys/ufs/ffs/ffs_inode.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ffs_inode.c,v 1.68 2014/03/19 04:17:33 guenther Exp $ */ +/* $OpenBSD: ffs_inode.c,v 1.69 2014/05/22 02:02:39 guenther Exp $ */ /* $NetBSD: ffs_inode.c,v 1.10 1996/05/11 18:27:19 mycroft Exp $ */ /* @@ -76,7 +76,7 @@ ffs_update(struct inode *ip, int waitfor) vp = ITOV(ip); ufs_itimes(vp); - if ((ip->i_flag & IN_MODIFIED) == 0 && waitfor != MNT_WAIT) + if ((ip->i_flag & IN_MODIFIED) == 0 && waitfor == 0) return (0); ip->i_flag &= ~(IN_MODIFIED | IN_LAZYMOD); @@ -165,7 +165,7 @@ ffs_truncate(struct inode *oip, off_t length, int flags, struct ucred *cred) memset(SHORTLINK(oip), 0, (size_t) DIP(oip, size)); DIP_ASSIGN(oip, size, 0); oip->i_flag |= IN_CHANGE | IN_UPDATE; - return (UFS_UPDATE(oip, MNT_WAIT)); + return (UFS_UPDATE(oip, 1)); } if ((error = getinoquota(oip)) != 0) @@ -224,7 +224,7 @@ ffs_truncate(struct inode *oip, off_t length, int flags, struct ucred *cred) else bawrite(bp); oip->i_flag |= IN_CHANGE | IN_UPDATE; - return (UFS_UPDATE(oip, MNT_WAIT)); + return (UFS_UPDATE(oip, 1)); } uvm_vnp_setsize(ovp, length); @@ -304,7 +304,7 @@ ffs_truncate(struct inode *oip, off_t length, int flags, struct ucred *cred) } oip->i_flag |= IN_CHANGE | IN_UPDATE; - if ((error = UFS_UPDATE(oip, MNT_WAIT)) != 0) + if ((error = UFS_UPDATE(oip, 1)) != 0) allerror = error; /* diff --git a/sys/ufs/ffs/ffs_softdep.c b/sys/ufs/ffs/ffs_softdep.c index cb4ea661f6c..d29df5de4f7 100644 --- a/sys/ufs/ffs/ffs_softdep.c +++ b/sys/ufs/ffs/ffs_softdep.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ffs_softdep.c,v 1.126 2014/04/22 20:14:39 beck Exp $ */ +/* $OpenBSD: ffs_softdep.c,v 1.127 2014/05/22 02:02:39 guenther Exp $ */ /* * Copyright 1998, 2000 Marshall Kirk McKusick. All Rights Reserved. @@ -4572,7 +4572,7 @@ softdep_fsync(struct vnode *vp) */ pip = VTOI(pvp); if (flushparent) { - error = UFS_UPDATE(pip, MNT_WAIT); + error = UFS_UPDATE(pip, 1); if (error) { vput(pvp); return (error); @@ -5052,7 +5052,7 @@ flush_pagedep_deps(struct vnode *pvp, struct mount *mp, */ if (dap->da_state & MKDIR_PARENT) { FREE_LOCK(&lk); - if ((error = UFS_UPDATE(VTOI(pvp), MNT_WAIT))) + if ((error = UFS_UPDATE(VTOI(pvp), 1))) break; ACQUIRE_LOCK(&lk); /* diff --git a/sys/ufs/ffs/ffs_vnops.c b/sys/ufs/ffs/ffs_vnops.c index 292b079a077..bdad4df548e 100644 --- a/sys/ufs/ffs/ffs_vnops.c +++ b/sys/ufs/ffs/ffs_vnops.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ffs_vnops.c,v 1.75 2014/05/09 03:48:58 tedu Exp $ */ +/* $OpenBSD: ffs_vnops.c,v 1.76 2014/05/22 02:02:39 guenther Exp $ */ /* $NetBSD: ffs_vnops.c,v 1.7 1996/05/11 18:27:24 mycroft Exp $ */ /* @@ -413,7 +413,7 @@ ffs_write(void *v) uio->uio_resid = resid; } } else if (resid > uio->uio_resid && (ioflag & IO_SYNC)) { - error = UFS_UPDATE(ip, MNT_WAIT); + error = UFS_UPDATE(ip, 1); } /* correct the result for writes clamped by vn_fsizechk() */ uio->uio_resid += overrun; -- 2.20.1