diff options
author | phk <phk@FreeBSD.org> | 2005-01-14 08:52:55 +0000 |
---|---|---|
committer | phk <phk@FreeBSD.org> | 2005-01-14 08:52:55 +0000 |
commit | 3c319ea2eac56f153a87df3c9616031973d63110 (patch) | |
tree | 0d91d3a8494619b0456cbc03495c9064ea09854b /sys/fs/smbfs | |
parent | 8000a91d499119f947c1c2a191f7ec2946392ec2 (diff) | |
download | FreeBSD-src-3c319ea2eac56f153a87df3c9616031973d63110.zip FreeBSD-src-3c319ea2eac56f153a87df3c9616031973d63110.tar.gz |
Eliminate unused and constant arguments to smbfs_vinvalbuf()
Diffstat (limited to 'sys/fs/smbfs')
-rw-r--r-- | sys/fs/smbfs/smbfs.h | 3 | ||||
-rw-r--r-- | sys/fs/smbfs/smbfs_io.c | 30 | ||||
-rw-r--r-- | sys/fs/smbfs/smbfs_node.c | 2 | ||||
-rw-r--r-- | sys/fs/smbfs/smbfs_vnops.c | 4 |
4 files changed, 13 insertions, 26 deletions
diff --git a/sys/fs/smbfs/smbfs.h b/sys/fs/smbfs/smbfs.h index 9436b88..59693e3 100644 --- a/sys/fs/smbfs/smbfs.h +++ b/sys/fs/smbfs/smbfs.h @@ -103,8 +103,7 @@ struct smbmount { int smbfs_ioctl(struct vop_ioctl_args *ap); int smbfs_doio(struct vnode *vp, struct buf *bp, struct ucred *cr, struct thread *td); -int smbfs_vinvalbuf(struct vnode *vp, int flags, struct ucred *cred, - struct thread *td, int intrflg); +int smbfs_vinvalbuf(struct vnode *vp, struct thread *td); #endif /* KERNEL */ #endif /* _SMBFS_SMBFS_H_ */ diff --git a/sys/fs/smbfs/smbfs_io.c b/sys/fs/smbfs/smbfs_io.c index 846b081..ef18709 100644 --- a/sys/fs/smbfs/smbfs_io.c +++ b/sys/fs/smbfs/smbfs_io.c @@ -224,7 +224,7 @@ smbfs_readvnode(struct vnode *vp, struct uio *uiop, struct ucred *cred) if (error) return error; if (np->n_mtime.tv_sec != vattr.va_mtime.tv_sec) { - error = smbfs_vinvalbuf(vp, V_SAVE, cred, td, 1); + error = smbfs_vinvalbuf(vp, td); if (error) return error; np->n_mtime.tv_sec = vattr.va_mtime.tv_sec; @@ -259,7 +259,7 @@ smbfs_writevnode(struct vnode *vp, struct uio *uiop, if (ioflag & (IO_APPEND | IO_SYNC)) { if (np->n_flag & NMODIFIED) { smbfs_attr_cacheremove(vp); - error = smbfs_vinvalbuf(vp, V_SAVE, cred, td, 1); + error = smbfs_vinvalbuf(vp, td); if (error) return error; } @@ -667,37 +667,25 @@ smbfs_putpages(ap) * doing the flush, just wait for completion. */ int -smbfs_vinvalbuf(vp, flags, cred, td, intrflg) - struct vnode *vp; - int flags; - struct ucred *cred; - struct thread *td; - int intrflg; +smbfs_vinvalbuf(struct vnode *vp, struct thread *td) { struct smbnode *np = VTOSMB(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, "smfsvinv", slptimeo); + error = tsleep(&np->n_flag, PRIBIO + 2, "smfsvinv", 2 * hz); error = smb_td_intr(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; @@ -705,7 +693,7 @@ smbfs_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) { diff --git a/sys/fs/smbfs/smbfs_node.c b/sys/fs/smbfs/smbfs_node.c index 8be8812..465522f 100644 --- a/sys/fs/smbfs/smbfs_node.c +++ b/sys/fs/smbfs/smbfs_node.c @@ -362,7 +362,7 @@ smbfs_inactive(ap) SMBVDEBUG("%s: %d\n", VTOSMB(vp)->n_name, vrefcnt(vp)); if ((np->n_flag & NOPEN) != 0) { smb_makescred(&scred, td, cred); - smbfs_vinvalbuf(vp, V_SAVE, cred, td, 1); + smbfs_vinvalbuf(vp, td); if (vp->v_type == VREG) { VOP_GETATTR(vp, &va, cred, td); smbfs_smb_close(np->n_mount->sm_share, np->n_fid, diff --git a/sys/fs/smbfs/smbfs_vnops.c b/sys/fs/smbfs/smbfs_vnops.c index af92810..fb0976f 100644 --- a/sys/fs/smbfs/smbfs_vnops.c +++ b/sys/fs/smbfs/smbfs_vnops.c @@ -173,7 +173,7 @@ smbfs_open(ap) return 0; } if (np->n_flag & NMODIFIED) { - if ((error = smbfs_vinvalbuf(vp, V_SAVE, ap->a_cred, ap->a_td, 1)) == EINTR) + if ((error = smbfs_vinvalbuf(vp, ap->a_td)) == EINTR) return error; smbfs_attr_cacheremove(vp); error = VOP_GETATTR(vp, &vattr, ap->a_cred, ap->a_td); @@ -185,7 +185,7 @@ smbfs_open(ap) if (error) return error; if (np->n_mtime.tv_sec != vattr.va_mtime.tv_sec) { - error = smbfs_vinvalbuf(vp, V_SAVE, ap->a_cred, ap->a_td, 1); + error = smbfs_vinvalbuf(vp, ap->a_td); if (error == EINTR) return error; np->n_mtime.tv_sec = vattr.va_mtime.tv_sec; |