summaryrefslogtreecommitdiffstats
path: root/sys/nfsclient/nfs_vnops.c
diff options
context:
space:
mode:
authorphk <phk@FreeBSD.org>2005-01-11 07:36:22 +0000
committerphk <phk@FreeBSD.org>2005-01-11 07:36:22 +0000
commitda2718f1af898ee94e792d508153bc47de407fe3 (patch)
tree7316b582ef3e13abcf40fdc592649edfe19bde75 /sys/nfsclient/nfs_vnops.c
parent63ced9b235017eb23882751a80aa345b4e4cf075 (diff)
downloadFreeBSD-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/nfsclient/nfs_vnops.c')
-rw-r--r--sys/nfsclient/nfs_vnops.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/sys/nfsclient/nfs_vnops.c b/sys/nfsclient/nfs_vnops.c
index f2074dd..36540c2 100644
--- a/sys/nfsclient/nfs_vnops.c
+++ b/sys/nfsclient/nfs_vnops.c
@@ -99,7 +99,7 @@ __FBSDID("$FreeBSD$");
static vop_read_t nfsfifo_read;
static vop_write_t nfsfifo_write;
static vop_close_t nfsfifo_close;
-static int nfs_flush(struct vnode *, struct ucred *, int, struct thread *,
+static int nfs_flush(struct vnode *, int, struct thread *,
int);
static int nfs_setattrrpc(struct vnode *, struct vattr *, struct ucred *,
struct thread *);
@@ -534,7 +534,7 @@ nfs_close(struct vop_close_args *ap)
* cannot clear it if we don't commit.
*/
int cm = nfsv3_commit_on_close ? 1 : 0;
- error = nfs_flush(vp, ap->a_cred, MNT_WAIT, ap->a_td, cm);
+ error = nfs_flush(vp, MNT_WAIT, ap->a_td, cm);
/* np->n_flag &= ~NMODIFIED; */
} else {
error = nfs_vinvalbuf(vp, V_SAVE, ap->a_cred, ap->a_td, 1);
@@ -1585,10 +1585,10 @@ nfs_rename(struct vop_rename_args *ap)
* that was written back to our cache earlier. Not checking for
* this condition can result in potential (silent) data loss.
*/
- error = VOP_FSYNC(fvp, fcnp->cn_cred, MNT_WAIT, fcnp->cn_thread);
+ error = VOP_FSYNC(fvp, MNT_WAIT, fcnp->cn_thread);
VOP_UNLOCK(fvp, 0, fcnp->cn_thread);
if (!error && tvp)
- error = VOP_FSYNC(tvp, tcnp->cn_cred, MNT_WAIT, tcnp->cn_thread);
+ error = VOP_FSYNC(tvp, MNT_WAIT, tcnp->cn_thread);
if (error)
goto out;
@@ -1704,7 +1704,7 @@ nfs_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);
v3 = NFS_ISV3(vp);
nfsstats.rpccnt[NFSPROC_LINK]++;
@@ -2661,7 +2661,7 @@ static int
nfs_fsync(struct vop_fsync_args *ap)
{
- return (nfs_flush(ap->a_vp, ap->a_cred, ap->a_waitfor, ap->a_td, 1));
+ return (nfs_flush(ap->a_vp, ap->a_waitfor, ap->a_td, 1));
}
/*
@@ -2670,7 +2670,7 @@ nfs_fsync(struct vop_fsync_args *ap)
* associated with the vnode.
*/
static int
-nfs_flush(struct vnode *vp, struct ucred *cred, int waitfor, struct thread *td,
+nfs_flush(struct vnode *vp, int waitfor, struct thread *td,
int commit)
{
struct nfsnode *np = VTONFS(vp);
OpenPOWER on IntegriCloud