summaryrefslogtreecommitdiffstats
path: root/sys/fs/coda
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/fs/coda
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/fs/coda')
-rw-r--r--sys/fs/coda/coda_venus.c5
-rw-r--r--sys/fs/coda/coda_venus.h3
-rw-r--r--sys/fs/coda/coda_vfsops.c3
-rw-r--r--sys/fs/coda/coda_vnops.c5
4 files changed, 6 insertions, 10 deletions
diff --git a/sys/fs/coda/coda_venus.c b/sys/fs/coda/coda_venus.c
index a222e7d..5982367 100644
--- a/sys/fs/coda/coda_venus.c
+++ b/sys/fs/coda/coda_venus.c
@@ -395,14 +395,13 @@ venus_readlink(void *mdp, CodaFid *fid,
}
int
-venus_fsync(void *mdp, CodaFid *fid,
- struct ucred *cred, struct proc *p)
+venus_fsync(void *mdp, CodaFid *fid, struct proc *p)
{
DECL_NO_OUT(coda_fsync); /* sets Isize & Osize */
ALLOC_NO_OUT(coda_fsync); /* sets inp & outp */
/* send the open to venus. */
- INIT_IN(&inp->ih, CODA_FSYNC, cred, p);
+ INIT_IN(&inp->ih, CODA_FSYNC, NOCRED, p); /* XXX: should be cached mount cred */
inp->Fid = *fid;
error = coda_call(mdp, Isize, &Osize, (char *)inp);
diff --git a/sys/fs/coda/coda_venus.h b/sys/fs/coda/coda_venus.h
index 533ddcb..1d1e0cf 100644
--- a/sys/fs/coda/coda_venus.h
+++ b/sys/fs/coda/coda_venus.h
@@ -75,8 +75,7 @@ venus_readlink(void *mdp, CodaFid *fid,
/*out*/ char **str, int *len);
int
-venus_fsync(void *mdp, CodaFid *fid,
- struct ucred *cred, struct proc *p);
+venus_fsync(void *mdp, CodaFid *fid, struct proc *p);
int
venus_lookup(void *mdp, CodaFid *fid,
diff --git a/sys/fs/coda/coda_vfsops.c b/sys/fs/coda/coda_vfsops.c
index 103946b..5e7c250 100644
--- a/sys/fs/coda/coda_vfsops.c
+++ b/sys/fs/coda/coda_vfsops.c
@@ -419,10 +419,9 @@ coda_nb_statfs(vfsp, sbp, td)
* Flush any pending I/O.
*/
int
-coda_sync(vfsp, waitfor, cred, td)
+coda_sync(vfsp, waitfor, td)
struct mount *vfsp;
int waitfor;
- struct ucred *cred;
struct thread *td;
{
ENTRY;
diff --git a/sys/fs/coda/coda_vnops.c b/sys/fs/coda/coda_vnops.c
index c204ef6..71b6976 100644
--- a/sys/fs/coda/coda_vnops.c
+++ b/sys/fs/coda/coda_vnops.c
@@ -763,7 +763,6 @@ coda_fsync(struct vop_fsync_args *ap)
/* true args */
struct vnode *vp = ap->a_vp;
struct cnode *cp = VTOC(vp);
- struct ucred *cred = ap->a_cred;
struct thread *td = ap->a_td;
/* locals */
struct vnode *convp = cp->c_ovp;
@@ -787,7 +786,7 @@ coda_fsync(struct vop_fsync_args *ap)
}
if (convp)
- VOP_FSYNC(convp, cred, MNT_WAIT, td);
+ VOP_FSYNC(convp, MNT_WAIT, td);
/*
* We see fsyncs with usecount == 1 then usecount == 0.
@@ -815,7 +814,7 @@ coda_fsync(struct vop_fsync_args *ap)
/* needs research */
return 0;
- error = venus_fsync(vtomi(vp), &cp->c_fid, cred, td->td_proc);
+ error = venus_fsync(vtomi(vp), &cp->c_fid, td->td_proc);
CODADEBUG(CODA_FSYNC, myprintf(("in fsync result %d\n",error)); );
return(error);
OpenPOWER on IntegriCloud