revert ufs_lookup.c rev.1.53 (MNT_ASYNC changes)
it was redundant because our bwrite() knows about MNT_ASYNC. ok'ed by Jaromir Dolecek and Chuck Silvers.
This commit is contained in:
parent
222e389ef2
commit
25a0a3496e
@ -1,4 +1,4 @@
|
|||||||
/* $NetBSD: ufs_lookup.c,v 1.54 2003/11/08 06:36:13 dbj Exp $ */
|
/* $NetBSD: ufs_lookup.c,v 1.55 2004/03/06 06:54:12 yamt Exp $ */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 1989, 1993
|
* Copyright (c) 1989, 1993
|
||||||
@ -37,7 +37,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include <sys/cdefs.h>
|
#include <sys/cdefs.h>
|
||||||
__KERNEL_RCSID(0, "$NetBSD: ufs_lookup.c,v 1.54 2003/11/08 06:36:13 dbj Exp $");
|
__KERNEL_RCSID(0, "$NetBSD: ufs_lookup.c,v 1.55 2004/03/06 06:54:12 yamt Exp $");
|
||||||
|
|
||||||
#include <sys/param.h>
|
#include <sys/param.h>
|
||||||
#include <sys/systm.h>
|
#include <sys/systm.h>
|
||||||
@ -763,7 +763,7 @@ ufs_direnter(dvp, tvp, dirp, cnp, newdirbp)
|
|||||||
if (dp->i_offset & (dirblksiz - 1))
|
if (dp->i_offset & (dirblksiz - 1))
|
||||||
panic("ufs_direnter: newblk");
|
panic("ufs_direnter: newblk");
|
||||||
flags = B_CLRBUF;
|
flags = B_CLRBUF;
|
||||||
if (!DOINGSOFTDEP(dvp) && !(dvp->v_mount->mnt_flag &MNT_ASYNC))
|
if (!DOINGSOFTDEP(dvp))
|
||||||
flags |= B_SYNC;
|
flags |= B_SYNC;
|
||||||
if ((error = VOP_BALLOC(dvp, (off_t)dp->i_offset, dirblksiz,
|
if ((error = VOP_BALLOC(dvp, (off_t)dp->i_offset, dirblksiz,
|
||||||
cr, flags, &bp)) != 0) {
|
cr, flags, &bp)) != 0) {
|
||||||
@ -831,11 +831,7 @@ ufs_direnter(dvp, tvp, dirp, cnp, newdirbp)
|
|||||||
vn_lock(tvp, LK_EXCLUSIVE | LK_RETRY);
|
vn_lock(tvp, LK_EXCLUSIVE | LK_RETRY);
|
||||||
return (error);
|
return (error);
|
||||||
} else {
|
} else {
|
||||||
if (dvp->v_mount->mnt_flag & MNT_ASYNC) {
|
error = VOP_BWRITE(bp);
|
||||||
bdwrite(bp);
|
|
||||||
error = 0;
|
|
||||||
} else
|
|
||||||
error = VOP_BWRITE(bp);
|
|
||||||
}
|
}
|
||||||
TIMEVAL_TO_TIMESPEC(&time, &ts);
|
TIMEVAL_TO_TIMESPEC(&time, &ts);
|
||||||
ret = VOP_UPDATE(dvp, &ts, &ts, UPDATE_DIROP);
|
ret = VOP_UPDATE(dvp, &ts, &ts, UPDATE_DIROP);
|
||||||
@ -939,11 +935,7 @@ ufs_direnter(dvp, tvp, dirp, cnp, newdirbp)
|
|||||||
ufs_rw32(dirp->d_ino, needswap), newdirbp, 0);
|
ufs_rw32(dirp->d_ino, needswap), newdirbp, 0);
|
||||||
bdwrite(bp);
|
bdwrite(bp);
|
||||||
} else {
|
} else {
|
||||||
if (dvp->v_mount->mnt_flag & MNT_ASYNC) {
|
error = VOP_BWRITE(bp);
|
||||||
bdwrite(bp);
|
|
||||||
error = 0;
|
|
||||||
} else
|
|
||||||
error = VOP_BWRITE(bp);
|
|
||||||
}
|
}
|
||||||
dp->i_flag |= IN_CHANGE | IN_UPDATE;
|
dp->i_flag |= IN_CHANGE | IN_UPDATE;
|
||||||
/*
|
/*
|
||||||
@ -1037,11 +1029,7 @@ out:
|
|||||||
DIP_ASSIGN(ip, nlink, ip->i_nlink);
|
DIP_ASSIGN(ip, nlink, ip->i_nlink);
|
||||||
ip->i_flag |= IN_CHANGE;
|
ip->i_flag |= IN_CHANGE;
|
||||||
}
|
}
|
||||||
if (dvp->v_mount->mnt_flag & MNT_ASYNC) {
|
error = VOP_BWRITE(bp);
|
||||||
bdwrite(bp);
|
|
||||||
error = 0;
|
|
||||||
} else
|
|
||||||
error = VOP_BWRITE(bp);
|
|
||||||
}
|
}
|
||||||
dp->i_flag |= IN_CHANGE | IN_UPDATE;
|
dp->i_flag |= IN_CHANGE | IN_UPDATE;
|
||||||
return (error);
|
return (error);
|
||||||
@ -1080,11 +1068,7 @@ ufs_dirrewrite(dp, oip, newinum, newtype, isrmdir, iflags)
|
|||||||
oip->i_nlink--;
|
oip->i_nlink--;
|
||||||
DIP_ASSIGN(oip, nlink, oip->i_nlink);
|
DIP_ASSIGN(oip, nlink, oip->i_nlink);
|
||||||
oip->i_flag |= IN_CHANGE;
|
oip->i_flag |= IN_CHANGE;
|
||||||
if (vdp->v_mount->mnt_flag & MNT_ASYNC) {
|
error = VOP_BWRITE(bp);
|
||||||
bdwrite(bp);
|
|
||||||
error = 0;
|
|
||||||
} else
|
|
||||||
error = VOP_BWRITE(bp);
|
|
||||||
}
|
}
|
||||||
dp->i_flag |= iflags;
|
dp->i_flag |= iflags;
|
||||||
return (error);
|
return (error);
|
||||||
|
Loading…
Reference in New Issue
Block a user