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
This commit is contained in:
parent
7335ed90a0
commit
064f517d2b
@ -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 @@ flush_pagedep_deps(pvp, mp, diraddhdp)
|
||||
*/
|
||||
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 @@ flush_pagedep_deps(pvp, mp, diraddhdp)
|
||||
* 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 @@ flush_pagedep_deps(pvp, mp, diraddhdp)
|
||||
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;
|
||||
|
@ -324,7 +324,7 @@ ffs_syncvnode(struct vnode *vp, int waitfor)
|
||||
/* 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 @@ ffs_syncvnode(struct vnode *vp, int waitfor)
|
||||
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);
|
||||
|
Loading…
Reference in New Issue
Block a user