patch-2.4.0-test2 linux/include/linux/coda_linux.h

Next file: linux/include/linux/coda_opstats.h
Previous file: linux/include/linux/coda_fs_i.h
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.4.0-test1/linux/include/linux/coda_linux.h linux/include/linux/coda_linux.h
@@ -48,6 +48,8 @@
 
 /* this file:  heloers */
 static __inline__ struct ViceFid *coda_i2f(struct inode *);
+static __inline__ char *coda_i2s(struct inode *);
+static __inline__ void coda_flag_inode(struct inode *, int flag);
 char *coda_f2s(ViceFid *f);
 char *coda_f2s2(ViceFid *f);
 int coda_isroot(struct inode *i);
@@ -56,7 +58,6 @@
 int coda_iscontrol(const char *name, size_t length);
 
 void coda_load_creds(struct coda_cred *cred);
-int coda_mycred(struct coda_cred *);
 void coda_vattr_to_iattr(struct inode *, struct coda_vattr *);
 void coda_iattr_to_vattr(struct iattr *, struct coda_vattr *);
 unsigned short coda_flags_to_cflags(unsigned short);
@@ -64,16 +65,6 @@
 int coda_cred_ok(struct coda_cred *cred);
 int coda_cred_eq(struct coda_cred *cred1, struct coda_cred *cred2);
 
-/* defined in  file.c */
-void coda_prepare_openfile(struct inode *coda_inode, struct file *coda_file, 
-			   struct inode *open_inode,  struct file *open_file,
-			   struct dentry *open_dentry);
-void coda_restore_codafile(struct inode *coda_inode, struct file *coda_file, 
-			   struct inode *open_inode, struct file *open_file);
-int coda_inode_grab(dev_t dev, ino_t ino, struct inode **ind);
-
-#define NB_SFS_SIZ 0x895440
-
 /* cache.c */
 void coda_purge_children(struct inode *, int);
 void coda_purge_dentries(struct inode *);
@@ -110,8 +101,6 @@
 #define EXIT    \
     if(coda_print_entry) printk("Process %d leaving %s\n",current->pid,__FUNCTION__)
 
-#define CHECK_CNODE(c) do {  } while (0);
-
 #define CODA_ALLOC(ptr, cast, size)                                       \
 do {                                                                      \
     if (size < 3000) {                                                    \
@@ -129,18 +118,24 @@
 
 #define CODA_FREE(ptr,size) do {if (size < 3000) { kfree_s((ptr), (size)); CDEBUG(D_MALLOC, "kfreed: %lx at %p.\n", (long) size, ptr); } else { vfree((ptr)); CDEBUG(D_MALLOC, "vfreed: %lx at %p.\n", (long) size, ptr);} } while (0)
 
-/* inode to cnode */
+/* inode to cnode access functions */
 
 static __inline__ struct ViceFid *coda_i2f(struct inode *inode)
 {
 	return &(inode->u.coda_i.c_fid);
 }
 
-#define ITOC(inode) (&((inode)->u.coda_i))
-
-
-
+static __inline__ char *coda_i2s(struct inode *inode)
+{
+	return coda_f2s(&(inode->u.coda_i.c_fid));
+}
 
+/* this will not zap the inode away */
+static __inline__ void coda_flag_inode(struct inode *inode, int flag)
+{
+	inode->u.coda_i.c_flags |= flag;
+}		
 
+#define ITOC(inode) (&((inode)->u.coda_i))
 
 #endif

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)