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

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

diff -u --recursive --new-file v2.1.119/linux/fs/coda/cnode.c linux/fs/coda/cnode.c
@@ -14,7 +14,6 @@
 extern int coda_print_entry;
 
 /* cnode.c */
-
 static void coda_fill_inode(struct inode *inode, struct coda_vattr *attr)
 {
         CDEBUG(D_SUPER, "ino: %ld\n", inode->i_ino);
@@ -117,7 +116,6 @@
         return 0;
 }
 
-
 inline int coda_fideq(ViceFid *fid1, ViceFid *fid2)
 {
 	int eq;
@@ -126,6 +124,27 @@
 		 (fid1->Unique == fid2->Unique) );
 	return eq;
 }
+
+void coda_replace_fid(struct inode *inode, struct ViceFid *oldfid, 
+		      struct ViceFid *newfid)
+{
+	struct coda_inode_info *cnp;
+	struct coda_sb_info *sbi= coda_sbp(inode->i_sb);
+	
+	cnp = ITOC(inode);
+
+	if ( ! coda_fideq(&cnp->c_fid, oldfid) )
+		printk("What? oldfid != cnp->c_fid. Call 911.\n");
+
+	cnp->c_fid = *newfid;
+
+	list_del(&cnp->c_volrootlist);
+	if ( !coda_fid_is_weird(newfid) ) 
+		list_add(&cnp->c_volrootlist, &sbi->sbi_volroothead);
+
+	return;
+}
+
 
  
 

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