Fix few missed accmode changes in coda.

Approved by:	rwatson (mentor)
This commit is contained in:
Edward Tomasz Napierala 2008-11-03 16:36:23 +00:00
parent 8481e37b53
commit ea49f15447
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=184595
3 changed files with 7 additions and 5 deletions

View File

@ -102,7 +102,7 @@ struct cnode {
char *c_symlink; /* pointer to symbolic link */
u_short c_symlen; /* length of symbolic link */
uid_t c_cached_uid; /* cached uid */
mode_t c_cached_mode; /* cached access mode */
accmode_t c_cached_mode; /* cached access mode */
struct cnode *c_next; /* links if on FreeBSD machine */
};
#define VTOC(vp) ((struct cnode *)(vp)->v_data)

View File

@ -195,7 +195,7 @@ coda_acccache_purge(struct mount *mnt)
CODADEBUG(CODA_FLUSH, myprintf(("acccache "
"purge fid %s uid %d mode 0x%x\n",
coda_f2s(&cp->c_fid), cp->c_cached_uid,
cp->c_cached_mode)););
(int)cp->c_cached_mode)););
cp->c_flags &= ~C_ACCCACHE;
}
}
@ -223,7 +223,7 @@ coda_acccache_purgeuser(struct mount *mnt, uid_t uid)
CODADEBUG(CODA_PURGEUSER, myprintf((
"acccache purgeuser fid %s uid %d mode "
"0x%x\n", coda_f2s(&cp->c_fid),
cp->c_cached_uid, cp->c_cached_mode)););
cp->c_cached_uid, (int)cp->c_cached_mode)););
cp->c_flags &= ~C_ACCCACHE;
}
}

View File

@ -347,7 +347,7 @@ venus_setattr(void *mdp, CodaFid *fid, struct vattr *vap, struct ucred *cred)
}
int
venus_access(void *mdp, CodaFid *fid, int mode, struct ucred *cred,
venus_access(void *mdp, CodaFid *fid, accmode_t accmode, struct ucred *cred,
struct proc *p)
{
DECL_NO_OUT(coda_access); /* sets Isize & Osize */
@ -362,8 +362,10 @@ venus_access(void *mdp, CodaFid *fid, int mode, struct ucred *cred,
/*
* NOTE: FreeBSD and Venus internals use the "data" in the low 3
* bits. Hence, the conversion.
*
* XXX: We cast accmode_t variable into an int.
*/
inp->flags = mode>>6;
inp->flags = (int)accmode>>6;
error = coda_call(mdp, Isize, &Osize, (char *)inp);