diff options
Diffstat (limited to 'sys/kern')
-rw-r--r-- | sys/kern/vfs_bio.c | 2 | ||||
-rw-r--r-- | sys/kern/vfs_default.c | 8 | ||||
-rw-r--r-- | sys/kern/vfs_extattr.c | 5 | ||||
-rw-r--r-- | sys/kern/vfs_mount.c | 2 | ||||
-rw-r--r-- | sys/kern/vfs_subr.c | 6 | ||||
-rw-r--r-- | sys/kern/vfs_syscalls.c | 5 | ||||
-rw-r--r-- | sys/kern/vfs_vnops.c | 2 | ||||
-rw-r--r-- | sys/kern/vnode_if.src | 1 |
8 files changed, 13 insertions, 18 deletions
diff --git a/sys/kern/vfs_bio.c b/sys/kern/vfs_bio.c index 5562c9e..d1cc363 100644 --- a/sys/kern/vfs_bio.c +++ b/sys/kern/vfs_bio.c @@ -1028,7 +1028,7 @@ bdwrite(struct buf *bp) recursiveflushes++; } else if (bo->bo_dirty.bv_cnt > dirtybufthresh + 10) { BO_UNLOCK(bo); - (void) VOP_FSYNC(vp, td->td_ucred, MNT_NOWAIT, td); + (void) VOP_FSYNC(vp, MNT_NOWAIT, td); BO_LOCK(bo); altbufferflushes++; } else if (bo->bo_dirty.bv_cnt > dirtybufthresh) { diff --git a/sys/kern/vfs_default.c b/sys/kern/vfs_default.c index ba253e7..970861a 100644 --- a/sys/kern/vfs_default.c +++ b/sys/kern/vfs_default.c @@ -686,10 +686,9 @@ vfs_stdquotactl (mp, cmds, uid, arg, td) } int -vfs_stdsync(mp, waitfor, cred, td) +vfs_stdsync(mp, waitfor, td) struct mount *mp; int waitfor; - struct ucred *cred; struct thread *td; { struct vnode *vp, *nvp; @@ -718,7 +717,7 @@ loop: goto loop; continue; } - error = VOP_FSYNC(vp, cred, waitfor, td); + error = VOP_FSYNC(vp, waitfor, td); if (error) allerror = error; @@ -731,10 +730,9 @@ loop: } int -vfs_stdnosync (mp, waitfor, cred, td) +vfs_stdnosync (mp, waitfor, td) struct mount *mp; int waitfor; - struct ucred *cred; struct thread *td; { diff --git a/sys/kern/vfs_extattr.c b/sys/kern/vfs_extattr.c index 82a5f1f..17ef241 100644 --- a/sys/kern/vfs_extattr.c +++ b/sys/kern/vfs_extattr.c @@ -133,8 +133,7 @@ sync(td, uap) asyncflag = mp->mnt_flag & MNT_ASYNC; mp->mnt_flag &= ~MNT_ASYNC; vfs_msync(mp, MNT_NOWAIT); - VFS_SYNC(mp, MNT_NOWAIT, - ((td != NULL) ? td->td_ucred : NOCRED), td); + VFS_SYNC(mp, MNT_NOWAIT, td); mp->mnt_flag |= asyncflag; vn_finished_write(mp); } @@ -3053,7 +3052,7 @@ fsync(td, uap) vm_object_page_clean(obj, 0, 0, 0); VM_OBJECT_UNLOCK(obj); } - error = VOP_FSYNC(vp, fp->f_cred, MNT_WAIT, td); + error = VOP_FSYNC(vp, MNT_WAIT, td); if (error == 0 && vp->v_mount && (vp->v_mount->mnt_flag & MNT_SOFTDEP) && softdep_fsync_hook != NULL) error = (*softdep_fsync_hook)(vp); diff --git a/sys/kern/vfs_mount.c b/sys/kern/vfs_mount.c index 8a635f3..5e007e8 100644 --- a/sys/kern/vfs_mount.c +++ b/sys/kern/vfs_mount.c @@ -950,7 +950,7 @@ dounmount(mp, flags, td) vput(fsrootvp); } if (((mp->mnt_flag & MNT_RDONLY) || - (error = VFS_SYNC(mp, MNT_WAIT, td->td_ucred, td)) == 0) || + (error = VFS_SYNC(mp, MNT_WAIT, td)) == 0) || (flags & MNT_FORCE)) { error = VFS_UNMOUNT(mp, flags, td); } diff --git a/sys/kern/vfs_subr.c b/sys/kern/vfs_subr.c index 2b6f7a1..3f5d431 100644 --- a/sys/kern/vfs_subr.c +++ b/sys/kern/vfs_subr.c @@ -936,7 +936,7 @@ vinvalbuf(vp, flags, cred, td, slpflag, slptimeo) } if (bo->bo_dirty.bv_cnt > 0) { VI_UNLOCK(vp); - if ((error = VOP_FSYNC(vp, cred, MNT_WAIT, td)) != 0) + if ((error = VOP_FSYNC(vp, MNT_WAIT, td)) != 0) return (error); /* * XXX We could save a lock/unlock if this was only @@ -1487,7 +1487,7 @@ sync_vnode(struct bufobj *bo, struct thread *td) vholdl(vp); mtx_unlock(&sync_mtx); vn_lock(vp, LK_EXCLUSIVE | LK_RETRY | LK_INTERLOCK, td); - (void) VOP_FSYNC(vp, td->td_ucred, MNT_LAZY, td); + (void) VOP_FSYNC(vp, MNT_LAZY, td); VOP_UNLOCK(vp, 0, td); vn_finished_write(mp); VI_LOCK(vp); @@ -3135,7 +3135,7 @@ sync_fsync(ap) asyncflag = mp->mnt_flag & MNT_ASYNC; mp->mnt_flag &= ~MNT_ASYNC; vfs_msync(mp, MNT_NOWAIT); - error = VFS_SYNC(mp, MNT_LAZY, ap->a_cred, td); + error = VFS_SYNC(mp, MNT_LAZY, td); if (asyncflag) mp->mnt_flag |= MNT_ASYNC; vn_finished_write(mp); diff --git a/sys/kern/vfs_syscalls.c b/sys/kern/vfs_syscalls.c index 82a5f1f..17ef241 100644 --- a/sys/kern/vfs_syscalls.c +++ b/sys/kern/vfs_syscalls.c @@ -133,8 +133,7 @@ sync(td, uap) asyncflag = mp->mnt_flag & MNT_ASYNC; mp->mnt_flag &= ~MNT_ASYNC; vfs_msync(mp, MNT_NOWAIT); - VFS_SYNC(mp, MNT_NOWAIT, - ((td != NULL) ? td->td_ucred : NOCRED), td); + VFS_SYNC(mp, MNT_NOWAIT, td); mp->mnt_flag |= asyncflag; vn_finished_write(mp); } @@ -3053,7 +3052,7 @@ fsync(td, uap) vm_object_page_clean(obj, 0, 0, 0); VM_OBJECT_UNLOCK(obj); } - error = VOP_FSYNC(vp, fp->f_cred, MNT_WAIT, td); + error = VOP_FSYNC(vp, MNT_WAIT, td); if (error == 0 && vp->v_mount && (vp->v_mount->mnt_flag & MNT_SOFTDEP) && softdep_fsync_hook != NULL) error = (*softdep_fsync_hook)(vp); diff --git a/sys/kern/vfs_vnops.c b/sys/kern/vfs_vnops.c index e69ceda..3e98446 100644 --- a/sys/kern/vfs_vnops.c +++ b/sys/kern/vfs_vnops.c @@ -1021,7 +1021,7 @@ vfs_write_suspend(mp) mp->mnt_kern_flag |= MNTK_SUSPEND; if (mp->mnt_writeopcount > 0) (void) tsleep(&mp->mnt_writeopcount, PUSER - 1, "suspwt", 0); - if ((error = VFS_SYNC(mp, MNT_WAIT, td->td_ucred, td)) != 0) { + if ((error = VFS_SYNC(mp, MNT_WAIT, td)) != 0) { vfs_write_resume(mp); return (error); } diff --git a/sys/kern/vnode_if.src b/sys/kern/vnode_if.src index 17efba7..03f6303 100644 --- a/sys/kern/vnode_if.src +++ b/sys/kern/vnode_if.src @@ -247,7 +247,6 @@ vop_revoke { # vop_fsync { IN struct vnode *vp; - IN struct ucred *cred; IN int waitfor; IN struct thread *td; }; |