diff options
author | phk <phk@FreeBSD.org> | 2005-01-11 07:36:22 +0000 |
---|---|---|
committer | phk <phk@FreeBSD.org> | 2005-01-11 07:36:22 +0000 |
commit | da2718f1af898ee94e792d508153bc47de407fe3 (patch) | |
tree | 7316b582ef3e13abcf40fdc592649edfe19bde75 /sys/kern/vfs_subr.c | |
parent | 63ced9b235017eb23882751a80aa345b4e4cf075 (diff) | |
download | FreeBSD-src-da2718f1af898ee94e792d508153bc47de407fe3.zip FreeBSD-src-da2718f1af898ee94e792d508153bc47de407fe3.tar.gz |
Remove the unused credential argument from VOP_FSYNC() and VFS_SYNC().
I'm not sure why a credential was added to these in the first place, it is
not used anywhere and it doesn't make much sense:
The credentials for syncing a file (ability to write to the
file) should be checked at the system call level.
Credentials for syncing one or more filesystems ("none")
should be checked at the system call level as well.
If the filesystem implementation needs a particular credential
to carry out the syncing it would logically have to the
cached mount credential, or a credential cached along with
any delayed write data.
Discussed with: rwatson
Diffstat (limited to 'sys/kern/vfs_subr.c')
-rw-r--r-- | sys/kern/vfs_subr.c | 6 |
1 files changed, 3 insertions, 3 deletions
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); |