From 064f517d2b6ebfc42bf636d3fb85ac815196f134 Mon Sep 17 00:00:00 2001 From: Konstantin Belousov Date: Tue, 13 Mar 2012 22:04:27 +0000 Subject: [PATCH] Supply boolean as the second argument to ffs_update(), and not a MNT_[NO]WAIT constants, which in fact always caused sync operation. Based on the submission by: bde Reviewed by: mckusick MFC after: 2 weeks --- sys/ufs/ffs/ffs_softdep.c | 10 +++++----- sys/ufs/ffs/ffs_vnops.c | 4 ++-- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/sys/ufs/ffs/ffs_softdep.c b/sys/ufs/ffs/ffs_softdep.c index 67ef6f4b53a1..8797497ee4f1 100644 --- a/sys/ufs/ffs/ffs_softdep.c +++ b/sys/ufs/ffs/ffs_softdep.c @@ -6311,7 +6311,7 @@ softdep_journal_freeblocks(ip, cred, length, flags) DIP_SET(ip, i_size, length); ip->i_flag |= IN_CHANGE | IN_UPDATE; allocbuf(bp, frags); - ffs_update(vp, MNT_NOWAIT); + ffs_update(vp, 0); bawrite(bp); } else if (lastoff != 0 && vp->v_type != VDIR) { int size; @@ -12346,7 +12346,7 @@ flush_newblk_dep(vp, mp, lbn) * point at the newdirblk before the dependency * will go away. */ - error = ffs_update(vp, MNT_WAIT); + error = ffs_update(vp, 1); if (error) break; ACQUIRE_LOCK(&lk); @@ -12382,7 +12382,7 @@ restart: */ if (dap->da_state & MKDIR_PARENT) { FREE_LOCK(&lk); - if ((error = ffs_update(pvp, MNT_WAIT)) != 0) + if ((error = ffs_update(pvp, 1)) != 0) break; ACQUIRE_LOCK(&lk); /* @@ -12424,7 +12424,7 @@ restart: * disk. */ if (error == 0 && dap == LIST_FIRST(diraddhdp)) - error = ffs_update(vp, MNT_WAIT); + error = ffs_update(vp, 1); vput(vp); if (error != 0) break; @@ -12481,7 +12481,7 @@ retry: if ((error = ffs_vgetf(mp, inum, LK_EXCLUSIVE, &vp, FFSV_FORCEINSMQ))) break; - error = ffs_update(vp, MNT_WAIT); + error = ffs_update(vp, 1); vput(vp); if (error) break; diff --git a/sys/ufs/ffs/ffs_vnops.c b/sys/ufs/ffs/ffs_vnops.c index fd991fbb1a54..d7fc08980f1c 100644 --- a/sys/ufs/ffs/ffs_vnops.c +++ b/sys/ufs/ffs/ffs_vnops.c @@ -324,7 +324,7 @@ next: /* Write the inode after sync passes to flush deps. */ if (wait && DOINGSOFTDEP(vp) && noupdate == 0) { BO_UNLOCK(bo); - ffs_update(vp, MNT_WAIT); + ffs_update(vp, 1); BO_LOCK(bo); } /* switch between sync/async. */ @@ -339,7 +339,7 @@ next: BO_UNLOCK(bo); error = 0; if (noupdate == 0) - error = ffs_update(vp, MNT_WAIT); + error = ffs_update(vp, 1); if (DOINGSUJ(vp)) softdep_journal_fsync(VTOI(vp)); return (error);