patch-2.1.79 linux/fs/coda/cnode.c

Next file: linux/fs/coda/coda_linux.c
Previous file: linux/fs/coda/cache.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.1.78/linux/fs/coda/cnode.c linux/fs/coda/cnode.c
@@ -7,8 +7,8 @@
 
 #include <linux/coda.h>
 #include <linux/coda_linux.h>
-#include <linux/coda_psdev.h>
 #include <linux/coda_cnode.h>
+#include <linux/coda_psdev.h>
 
 extern int coda_debug;
 extern int coda_print_entry;
@@ -29,6 +29,7 @@
 
         memset(result, 0, (int) sizeof(struct cnode));
         INIT_LIST_HEAD(&(result->c_cnhead));
+	INIT_LIST_HEAD(&(result->c_volrootlist));
 	return result;
 }
 
@@ -70,6 +71,7 @@
 int coda_cnode_make(struct inode **inode, ViceFid *fid, struct super_block *sb)
 {
         struct cnode *cnp;
+	struct coda_sb_info *sbi= coda_sbp(sb);
         struct coda_vattr attr;
         int error;
 	ino_t ino;
@@ -119,6 +121,9 @@
 	CHECK_CNODE(cnp);
 
 	/* fill in the inode attributes */
+	if ( coda_fid_is_volroot(fid) ) 
+		list_add(&cnp->c_volrootlist, &sbi->sbi_volroothead);
+
         coda_fill_inode(*inode, &attr);
 	CDEBUG(D_CNODE, "Done linking: ino %ld,  at 0x%x with cnp 0x%x, cnp->c_vnode 0x%x\n", (*inode)->i_ino, (int) (*inode), (int) cnp, (int)cnp->c_vnode);
 
@@ -148,6 +153,7 @@
 ENTRY;
 
 	CDEBUG(D_INODE, "%s\n", coda_f2s(fid, str));
+
 	nr = coda_f2i(fid);
 	inode = iget(sb, nr);
 

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov