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/nfs4client | |
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/nfs4client')
-rw-r--r-- | sys/nfs4client/nfs4_vfsops.c | 4 | ||||
-rw-r--r-- | sys/nfs4client/nfs4_vnops.c | 12 |
2 files changed, 8 insertions, 8 deletions
diff --git a/sys/nfs4client/nfs4_vfsops.c b/sys/nfs4client/nfs4_vfsops.c index a198535..fa066c7 100644 --- a/sys/nfs4client/nfs4_vfsops.c +++ b/sys/nfs4client/nfs4_vfsops.c @@ -733,7 +733,7 @@ nfs_root(struct mount *mp, struct vnode **vpp, struct thread *td) */ /* ARGSUSED */ static int -nfs_sync(struct mount *mp, int waitfor, struct ucred *cred, struct thread *td) +nfs_sync(struct mount *mp, int waitfor, struct thread *td) { struct vnode *vp, *nvp; int error, allerror = 0; @@ -756,7 +756,7 @@ loop: if (vget(vp, LK_EXCLUSIVE | LK_INTERLOCK, td)) { goto loop; } - error = VOP_FSYNC(vp, cred, waitfor, td); + error = VOP_FSYNC(vp, waitfor, td); if (error) allerror = error; VOP_UNLOCK(vp, 0, td); diff --git a/sys/nfs4client/nfs4_vnops.c b/sys/nfs4client/nfs4_vnops.c index abb6b33..e61c779 100644 --- a/sys/nfs4client/nfs4_vnops.c +++ b/sys/nfs4client/nfs4_vnops.c @@ -127,7 +127,7 @@ __FBSDID("$FreeBSD$"); #define vfs_busy_pages(bp, f) #endif -static int nfs4_flush(struct vnode *, struct ucred *, int, struct thread *, +static int nfs4_flush(struct vnode *, int, struct thread *, int); static int nfs4_setattrrpc(struct vnode *, struct vattr *, struct ucred *, struct thread *); @@ -1791,10 +1791,10 @@ nfs4_rename(struct vop_rename_args *ap) * ( as far as I can tell ) it flushes dirty buffers more * often. */ - VOP_FSYNC(fvp, fcnp->cn_cred, MNT_WAIT, fcnp->cn_thread); + VOP_FSYNC(fvp, MNT_WAIT, fcnp->cn_thread); VOP_UNLOCK(fvp, 0, fcnp->cn_thread); if (tvp) - VOP_FSYNC(tvp, tcnp->cn_cred, MNT_WAIT, tcnp->cn_thread); + VOP_FSYNC(tvp, MNT_WAIT, tcnp->cn_thread); /* * If the tvp exists and is in use, sillyrename it before doing the @@ -1869,7 +1869,7 @@ nfs4_link(struct vop_link_args *ap) * doesn't get "out of sync" with the server. * XXX There should be a better way! */ - VOP_FSYNC(vp, cnp->cn_cred, MNT_WAIT, cnp->cn_thread); + VOP_FSYNC(vp, MNT_WAIT, cnp->cn_thread); nfsstats.rpccnt[NFSPROC_LINK]++; @@ -2549,7 +2549,7 @@ nfs4_strategy(struct vop_strategy_args *ap) static int nfs4_fsync(struct vop_fsync_args *ap) { - return (nfs4_flush(ap->a_vp, ap->a_cred, ap->a_waitfor, ap->a_td, 1)); + return (nfs4_flush(ap->a_vp, ap->a_waitfor, ap->a_td, 1)); } /* @@ -2558,7 +2558,7 @@ nfs4_fsync(struct vop_fsync_args *ap) * associated with the vnode. */ static int -nfs4_flush(struct vnode *vp, struct ucred *cred, int waitfor, struct thread *td, +nfs4_flush(struct vnode *vp, int waitfor, struct thread *td, int commit) { struct nfsnode *np = VTONFS(vp); |