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/fs/msdosfs | |
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/fs/msdosfs')
-rw-r--r-- | sys/fs/msdosfs/msdosfs_vfsops.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/sys/fs/msdosfs/msdosfs_vfsops.c b/sys/fs/msdosfs/msdosfs_vfsops.c index a79f08f..91dfb5c 100644 --- a/sys/fs/msdosfs/msdosfs_vfsops.c +++ b/sys/fs/msdosfs/msdosfs_vfsops.c @@ -270,7 +270,7 @@ msdosfs_mount(struct mount *mp, struct thread *td) } if (!(pmp->pm_flags & MSDOSFSMNT_RONLY) && vfs_flagopt(mp->mnt_optnew, "ro", NULL, 0)) { - error = VFS_SYNC(mp, MNT_WAIT, td->td_ucred, td); + error = VFS_SYNC(mp, MNT_WAIT, td); if (error) return (error); flags = WRITECLOSE; @@ -852,10 +852,9 @@ msdosfs_statfs(mp, sbp, td) } static int -msdosfs_sync(mp, waitfor, cred, td) +msdosfs_sync(mp, waitfor, td) struct mount *mp; int waitfor; - struct ucred *cred; struct thread *td; { struct vnode *vp, *nvp; @@ -902,7 +901,7 @@ loop: goto loop; continue; } - error = VOP_FSYNC(vp, cred, waitfor, td); + error = VOP_FSYNC(vp, waitfor, td); if (error) allerror = error; VOP_UNLOCK(vp, 0, td); @@ -916,7 +915,7 @@ loop: */ if (waitfor != MNT_LAZY) { vn_lock(pmp->pm_devvp, LK_EXCLUSIVE | LK_RETRY, td); - error = VOP_FSYNC(pmp->pm_devvp, cred, waitfor, td); + error = VOP_FSYNC(pmp->pm_devvp, waitfor, td); if (error) allerror = error; VOP_UNLOCK(pmp->pm_devvp, 0, td); |