1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-11 09:50:12 +00:00

Eliminate unused and unnecessary "cred" argument from vinvalbuf()

This commit is contained in:
Poul-Henning Kamp 2005-01-14 07:33:51 +00:00
parent f365db00e5
commit 7c0745eeae
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=140220
13 changed files with 25 additions and 27 deletions

View File

@ -374,7 +374,7 @@ hpfs_unmount(
return (error);
}
vinvalbuf(hpmp->hpm_devvp, V_SAVE, NOCRED, td, 0, 0);
vinvalbuf(hpmp->hpm_devvp, V_SAVE, td, 0, 0);
g_wither_geom_close(hpmp->hpm_cp->geom, ENXIO);
vrele(hpmp->hpm_devvp);

View File

@ -485,7 +485,7 @@ ntfs_unmount(
if (error)
printf("ntfs_unmount: vflush failed(sysnodes): %d\n",error);
vinvalbuf(ntmp->ntm_devvp, V_SAVE, NOCRED, td, 0, 0);
vinvalbuf(ntmp->ntm_devvp, V_SAVE, td, 0, 0);
DROP_GIANT();
g_topology_lock();

View File

@ -621,7 +621,7 @@ nwfs_vinvalbuf(vp, flags, cred, td, intrflg)
return EINTR;
}
np->n_flag |= NFLUSHINPROG;
error = vinvalbuf(vp, flags, cred, td, slpflag, 0);
error = vinvalbuf(vp, flags, td, slpflag, 0);
while (error) {
if (intrflg && (error == ERESTART || error == EINTR)) {
np->n_flag &= ~NFLUSHINPROG;
@ -631,7 +631,7 @@ nwfs_vinvalbuf(vp, flags, cred, td, intrflg)
}
return EINTR;
}
error = vinvalbuf(vp, flags, cred, td, slpflag, 0);
error = vinvalbuf(vp, flags, td, slpflag, 0);
}
np->n_flag &= ~(NMODIFIED | NFLUSHINPROG);
if (np->n_flag & NFLUSHWANT) {

View File

@ -695,7 +695,7 @@ smbfs_vinvalbuf(vp, flags, cred, td, intrflg)
return EINTR;
}
np->n_flag |= NFLUSHINPROG;
error = vinvalbuf(vp, flags, cred, td, slpflag, 0);
error = vinvalbuf(vp, flags, td, slpflag, 0);
while (error) {
if (intrflg && (error == ERESTART || error == EINTR)) {
np->n_flag &= ~NFLUSHINPROG;
@ -705,7 +705,7 @@ smbfs_vinvalbuf(vp, flags, cred, td, intrflg)
}
return EINTR;
}
error = vinvalbuf(vp, flags, cred, td, slpflag, 0);
error = vinvalbuf(vp, flags, td, slpflag, 0);
}
np->n_flag &= ~(NMODIFIED | NFLUSHINPROG);
if (np->n_flag & NFLUSHWANT) {

View File

@ -507,7 +507,7 @@ ext2_reload(mp, cred, td)
*/
devvp = VFSTOEXT2(mp)->um_devvp;
vn_lock(devvp, LK_EXCLUSIVE | LK_RETRY, td);
if (vinvalbuf(devvp, 0, cred, td, 0, 0) != 0)
if (vinvalbuf(devvp, 0, td, 0, 0) != 0)
panic("ext2_reload: dirty1");
VOP_UNLOCK(devvp, 0, td);
@ -557,7 +557,7 @@ ext2_reload(mp, cred, td)
if (vget(vp, LK_EXCLUSIVE | LK_INTERLOCK, td)) {
goto loop;
}
if (vinvalbuf(vp, 0, cred, td, 0, 0))
if (vinvalbuf(vp, 0, td, 0, 0))
panic("ext2_reload: dirty2");
/*
* Step 6: re-read inode data for all active vnodes.

View File

@ -507,7 +507,7 @@ ext2_reload(mp, cred, td)
*/
devvp = VFSTOEXT2(mp)->um_devvp;
vn_lock(devvp, LK_EXCLUSIVE | LK_RETRY, td);
if (vinvalbuf(devvp, 0, cred, td, 0, 0) != 0)
if (vinvalbuf(devvp, 0, td, 0, 0) != 0)
panic("ext2_reload: dirty1");
VOP_UNLOCK(devvp, 0, td);
@ -557,7 +557,7 @@ ext2_reload(mp, cred, td)
if (vget(vp, LK_EXCLUSIVE | LK_INTERLOCK, td)) {
goto loop;
}
if (vinvalbuf(vp, 0, cred, td, 0, 0))
if (vinvalbuf(vp, 0, td, 0, 0))
panic("ext2_reload: dirty2");
/*
* Step 6: re-read inode data for all active vnodes.

View File

@ -681,7 +681,7 @@ vfs_domount(
return (error);
}
}
error = vinvalbuf(vp, V_SAVE, td->td_ucred, td, 0, 0);
error = vinvalbuf(vp, V_SAVE, td, 0, 0);
if (error != 0) {
vput(vp);
return (error);
@ -1105,7 +1105,7 @@ devfs_fixup(struct thread *td)
if (vp->v_type != VDIR) {
vput(vp);
}
error = vinvalbuf(vp, V_SAVE, td->td_ucred, td, 0, 0);
error = vinvalbuf(vp, V_SAVE, td, 0, 0);
if (error) {
vput(vp);
}

View File

@ -910,10 +910,9 @@ insmntque(struct vnode *vp, struct mount *mp)
* Called with the underlying object locked.
*/
int
vinvalbuf(vp, flags, cred, td, slpflag, slptimeo)
vinvalbuf(vp, flags, td, slpflag, slptimeo)
struct vnode *vp;
int flags;
struct ucred *cred;
struct thread *td;
int slpflag, slptimeo;
{
@ -2235,8 +2234,8 @@ vclean(vp, flags, td)
bp = TAILQ_FIRST(&vp->v_bufobj.bo_dirty.bv_hd);
if (bp != NULL)
(void) vn_write_suspend_wait(vp, NULL, V_WAIT);
if (vinvalbuf(vp, V_SAVE, NOCRED, td, 0, 0) != 0)
vinvalbuf(vp, 0, NOCRED, td, 0, 0);
if (vinvalbuf(vp, V_SAVE, td, 0, 0) != 0)
vinvalbuf(vp, 0, td, 0, 0);
}
VOP_DESTROYVOBJECT(vp);

View File

@ -1261,11 +1261,11 @@ nfs_vinvalbuf(struct vnode *vp, int flags, struct ucred *cred,
/*
* Now, flush as required.
*/
error = vinvalbuf(vp, flags, cred, td, slpflag, 0);
error = vinvalbuf(vp, flags, td, slpflag, 0);
while (error) {
if (intrflg && (error = nfs_sigintr(nmp, NULL, td)))
goto out;
error = vinvalbuf(vp, flags, cred, td, 0, slptimeo);
error = vinvalbuf(vp, flags, td, 0, slptimeo);
}
np->n_flag &= ~NMODIFIED;
out:

View File

@ -605,7 +605,7 @@ void vgone(struct vnode *vp);
void vgonel(struct vnode *vp, struct thread *td);
void vhold(struct vnode *);
void vholdl(struct vnode *);
int vinvalbuf(struct vnode *vp, int save, struct ucred *cred,
int vinvalbuf(struct vnode *vp, int save,
struct thread *td, int slpflag, int slptimeo);
int vtruncbuf(struct vnode *vp, struct ucred *cred, struct thread *td,
off_t length, int blksize);

View File

@ -199,7 +199,7 @@ ffs_truncate(vp, length, flags, cred, td)
#ifdef QUOTA
(void) chkdq(oip, -extblocks, NOCRED, 0);
#endif
vinvalbuf(ovp, V_ALT, cred, td, 0, 0);
vinvalbuf(ovp, V_ALT, td, 0, 0);
oip->i_din2->di_extsize = 0;
for (i = 0; i < NXADDR; i++) {
oldblks[i] = oip->i_din2->di_extb[i];
@ -272,8 +272,7 @@ ffs_truncate(vp, length, flags, cred, td)
#endif
softdep_setup_freeblocks(oip, length, needextclean ?
IO_EXT | IO_NORMAL : IO_NORMAL);
vinvalbuf(ovp, needextclean ? 0 : V_NORMAL,
cred, td, 0, 0);
vinvalbuf(ovp, needextclean ? 0 : V_NORMAL, td, 0, 0);
oip->i_flag |= IN_CHANGE | IN_UPDATE;
return (ffs_update(ovp, 0));
}

View File

@ -408,7 +408,7 @@ ffs_reload(struct mount *mp, struct thread *td)
*/
devvp = VFSTOUFS(mp)->um_devvp;
vn_lock(devvp, LK_EXCLUSIVE | LK_RETRY, td);
if (vinvalbuf(devvp, 0, td->td_ucred, td, 0, 0) != 0)
if (vinvalbuf(devvp, 0, td, 0, 0) != 0)
panic("ffs_reload: dirty1");
VOP_CREATEVOBJECT(devvp, td->td_ucred, td);
VOP_UNLOCK(devvp, 0, td);
@ -500,7 +500,7 @@ ffs_reload(struct mount *mp, struct thread *td)
if (vget(vp, LK_EXCLUSIVE | LK_INTERLOCK, td)) {
goto loop;
}
if (vinvalbuf(vp, 0, td->td_ucred, td, 0, 0))
if (vinvalbuf(vp, 0, td, 0, 0))
panic("ffs_reload: dirty2");
/*
* Step 6: re-read inode data for all active vnodes.
@ -778,7 +778,7 @@ ffs_mountfs(devvp, mp, td)
out:
if (bp)
brelse(bp);
vinvalbuf(devvp, V_SAVE, NOCRED, td, 0, 0);
vinvalbuf(devvp, V_SAVE, td, 0, 0);
if (cp != NULL) {
DROP_GIANT();
g_topology_lock();
@ -937,7 +937,7 @@ ffs_unmount(mp, mntflags, td)
return (error);
}
}
vinvalbuf(ump->um_devvp, V_SAVE, NOCRED, td, 0, 0);
vinvalbuf(ump->um_devvp, V_SAVE, td, 0, 0);
DROP_GIANT();
g_topology_lock();
g_wither_geom_close(ump->um_cp->geom, ENXIO);

View File

@ -592,7 +592,7 @@ vm_object_terminate(vm_object_t object)
vm_object_page_clean(object, 0, 0, OBJPC_SYNC);
VM_OBJECT_UNLOCK(object);
vinvalbuf(vp, V_SAVE, NOCRED, NULL, 0, 0);
vinvalbuf(vp, V_SAVE, NULL, 0, 0);
VM_OBJECT_LOCK(object);
}