Eliminate constant and unused arguments to nwfs_vinvalbuf()
This commit is contained in:
parent
7c0745eeae
commit
bf0063b87d
@ -76,8 +76,7 @@ struct nwmount {
|
||||
int ncp_conn_logged_in(struct nwmount *);
|
||||
int nwfs_ioctl(struct vop_ioctl_args *ap);
|
||||
int nwfs_doio(struct vnode *vp, struct buf *bp, struct ucred *cr, struct thread *td);
|
||||
int nwfs_vinvalbuf(struct vnode *vp, int flags, struct ucred *cred,
|
||||
struct thread *td, int intrflg);
|
||||
int nwfs_vinvalbuf(struct vnode *vp, struct thread *td);
|
||||
|
||||
extern struct vop_vector nwfs_vnodeops;
|
||||
|
||||
|
@ -185,7 +185,7 @@ nwfs_readvnode(struct vnode *vp, struct uio *uiop, struct ucred *cred) {
|
||||
error = VOP_GETATTR(vp, &vattr, cred, td);
|
||||
if (error) return (error);
|
||||
if (np->n_mtime != vattr.va_mtime.tv_sec) {
|
||||
error = nwfs_vinvalbuf(vp, V_SAVE, cred, td, 1);
|
||||
error = nwfs_vinvalbuf(vp, td);
|
||||
if (error) return (error);
|
||||
np->n_mtime = vattr.va_mtime.tv_sec;
|
||||
}
|
||||
@ -219,7 +219,7 @@ nwfs_writevnode(vp, uiop, cred, ioflag)
|
||||
if (ioflag & (IO_APPEND | IO_SYNC)) {
|
||||
if (np->n_flag & NMODIFIED) {
|
||||
nwfs_attr_cacheremove(vp);
|
||||
error = nwfs_vinvalbuf(vp, V_SAVE, cred, td, 1);
|
||||
error = nwfs_vinvalbuf(vp, td);
|
||||
if (error) return (error);
|
||||
}
|
||||
if (ioflag & IO_APPEND) {
|
||||
@ -592,38 +592,28 @@ nwfs_putpages(ap)
|
||||
* doing the flush, just wait for completion.
|
||||
*/
|
||||
int
|
||||
nwfs_vinvalbuf(vp, flags, cred, td, intrflg)
|
||||
nwfs_vinvalbuf(vp, td)
|
||||
struct vnode *vp;
|
||||
int flags;
|
||||
struct ucred *cred;
|
||||
struct thread *td;
|
||||
int intrflg;
|
||||
{
|
||||
struct nwnode *np = VTONW(vp);
|
||||
/* struct nwmount *nmp = VTONWFS(vp);*/
|
||||
int error = 0, slpflag, slptimeo;
|
||||
int error = 0;
|
||||
|
||||
if (vp->v_iflag & VI_XLOCK)
|
||||
return (0);
|
||||
|
||||
if (intrflg) {
|
||||
slpflag = PCATCH;
|
||||
slptimeo = 2 * hz;
|
||||
} else {
|
||||
slpflag = 0;
|
||||
slptimeo = 0;
|
||||
}
|
||||
while (np->n_flag & NFLUSHINPROG) {
|
||||
np->n_flag |= NFLUSHWANT;
|
||||
error = tsleep(&np->n_flag, PRIBIO + 2, "nwfsvinv", slptimeo);
|
||||
error = tsleep(&np->n_flag, PRIBIO + 2, "nwfsvinv", 2 * hz);
|
||||
error = ncp_chkintr(NWFSTOCONN(VTONWFS(vp)), td);
|
||||
if (error == EINTR && intrflg)
|
||||
if (error == EINTR)
|
||||
return EINTR;
|
||||
}
|
||||
np->n_flag |= NFLUSHINPROG;
|
||||
error = vinvalbuf(vp, flags, td, slpflag, 0);
|
||||
error = vinvalbuf(vp, V_SAVE, td, PCATCH, 0);
|
||||
while (error) {
|
||||
if (intrflg && (error == ERESTART || error == EINTR)) {
|
||||
if (error == ERESTART || error == EINTR) {
|
||||
np->n_flag &= ~NFLUSHINPROG;
|
||||
if (np->n_flag & NFLUSHWANT) {
|
||||
np->n_flag &= ~NFLUSHWANT;
|
||||
@ -631,7 +621,7 @@ nwfs_vinvalbuf(vp, flags, cred, td, intrflg)
|
||||
}
|
||||
return EINTR;
|
||||
}
|
||||
error = vinvalbuf(vp, flags, td, slpflag, 0);
|
||||
error = vinvalbuf(vp, V_SAVE, td, PCATCH, 0);
|
||||
}
|
||||
np->n_flag &= ~(NMODIFIED | NFLUSHINPROG);
|
||||
if (np->n_flag & NFLUSHWANT) {
|
||||
|
@ -292,7 +292,7 @@ nwfs_inactive(ap)
|
||||
|
||||
NCPVNDEBUG("%s: %d\n", VTONW(vp)->n_name, vrefcnt(vp));
|
||||
if (np->opened) {
|
||||
error = nwfs_vinvalbuf(vp, V_SAVE, cred, td, 1);
|
||||
error = nwfs_vinvalbuf(vp, td);
|
||||
error = ncp_close_file(NWFSTOCONN(VTONWFS(vp)), &np->n_fh, td, cred);
|
||||
np->opened = 0;
|
||||
}
|
||||
|
@ -172,7 +172,7 @@ nwfs_open(ap)
|
||||
}
|
||||
if (vp->v_type == VDIR) return 0; /* nothing to do now */
|
||||
if (np->n_flag & NMODIFIED) {
|
||||
if ((error = nwfs_vinvalbuf(vp, V_SAVE, ap->a_cred, ap->a_td, 1)) == EINTR)
|
||||
if ((error = nwfs_vinvalbuf(vp, ap->a_td)) == EINTR)
|
||||
return (error);
|
||||
np->n_atime = 0;
|
||||
error = VOP_GETATTR(vp, &vattr, ap->a_cred, ap->a_td);
|
||||
@ -182,7 +182,7 @@ nwfs_open(ap)
|
||||
error = VOP_GETATTR(vp, &vattr, ap->a_cred, ap->a_td);
|
||||
if (error) return (error);
|
||||
if (np->n_mtime != vattr.va_mtime.tv_sec) {
|
||||
if ((error = nwfs_vinvalbuf(vp, V_SAVE, ap->a_cred, ap->a_td, 1)) == EINTR)
|
||||
if ((error = nwfs_vinvalbuf(vp, ap->a_td)) == EINTR)
|
||||
return (error);
|
||||
np->n_mtime = vattr.va_mtime.tv_sec;
|
||||
}
|
||||
@ -237,7 +237,7 @@ nwfs_close(ap)
|
||||
return 0;
|
||||
}
|
||||
mtx_unlock(&vp->v_interlock);
|
||||
error = nwfs_vinvalbuf(vp, V_SAVE, ap->a_cred, ap->a_td, 1);
|
||||
error = nwfs_vinvalbuf(vp, ap->a_td);
|
||||
mtx_lock(&vp->v_interlock);
|
||||
if (np->opened == 0) {
|
||||
mtx_unlock(&vp->v_interlock);
|
||||
|
Loading…
x
Reference in New Issue
Block a user