Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 3 Nov 2008 16:36:23 +0000 (UTC)
From:      Edward Tomasz Napierala <trasz@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r184595 - head/sys/fs/coda
Message-ID:  <200811031636.mA3GaNVG070993@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: trasz
Date: Mon Nov  3 16:36:23 2008
New Revision: 184595
URL: http://svn.freebsd.org/changeset/base/184595

Log:
  Fix few missed accmode changes in coda.
  
  Approved by:	rwatson (mentor)

Modified:
  head/sys/fs/coda/cnode.h
  head/sys/fs/coda/coda_subr.c
  head/sys/fs/coda/coda_venus.c

Modified: head/sys/fs/coda/cnode.h
==============================================================================
--- head/sys/fs/coda/cnode.h	Mon Nov  3 15:38:45 2008	(r184594)
+++ head/sys/fs/coda/cnode.h	Mon Nov  3 16:36:23 2008	(r184595)
@@ -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)

Modified: head/sys/fs/coda/coda_subr.c
==============================================================================
--- head/sys/fs/coda/coda_subr.c	Mon Nov  3 15:38:45 2008	(r184594)
+++ head/sys/fs/coda/coda_subr.c	Mon Nov  3 16:36:23 2008	(r184595)
@@ -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 *mn
 				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;
 			}
 		}

Modified: head/sys/fs/coda/coda_venus.c
==============================================================================
--- head/sys/fs/coda/coda_venus.c	Mon Nov  3 15:38:45 2008	(r184594)
+++ head/sys/fs/coda/coda_venus.c	Mon Nov  3 16:36:23 2008	(r184595)
@@ -347,7 +347,7 @@ venus_setattr(void *mdp, CodaFid *fid, s
 }
 
 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, in
 	/*
 	 * 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);
 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200811031636.mA3GaNVG070993>