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

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

diff -u --recursive --new-file v2.1.119/linux/fs/coda/upcall.c linux/fs/coda/upcall.c
@@ -39,8 +39,6 @@
 #include <linux/coda_cache.h>
 #include <linux/coda_proc.h> 
 
-extern void coda_purge_dentries(struct inode *inode);
-extern void coda_purge_children(struct inode *inode);
 
 static int  coda_upcall(struct coda_sb_info *mntinfo, int inSize, int *outSize, 
 		       union inputArgs *buffer);
@@ -537,16 +535,12 @@
         inp->cfs_ioctl.data = (char *)(INSIZE(ioctl));
      
         /* get the data out of user space */
-#ifdef L20
-        memcpy_fromfs((char*)inp + (int)inp->cfs_ioctl.data,
-                      data->vi.in, data->vi.in_size);
-#else
         if ( copy_from_user((char*)inp + (int)inp->cfs_ioctl.data,
 			    data->vi.in, data->vi.in_size) ) {
 	        error = EINVAL;
 	        goto exit;
 	}
-#endif
+
         error = coda_upcall(coda_sbp(sb), insize, &outsize, inp);
         
         if (error) {
@@ -565,18 +559,13 @@
 		error = verify_area(VERIFY_WRITE, data->vi.out, 
                                     data->vi.out_size);
 		if ( error ) goto exit;
-#ifdef L20
-                memcpy_tofs(data->vi.out, 
-                            (char *)outp + (int)outp->cfs_ioctl.data, 
-                            data->vi.out_size);                
-#else
+
 		if (copy_to_user(data->vi.out, 
 				 (char *)outp + (int)outp->cfs_ioctl.data, 
 				 data->vi.out_size)) {
 		        error = EINVAL;
 			goto exit;
 		}
-#endif
         }
 
  exit:
@@ -891,18 +880,19 @@
 
 	  case CFS_REPLACE : {
 	          struct inode *inode;
-		  ViceFid *fid = &out->cfs_replace.OldFid;
+		  ViceFid *oldfid = &out->cfs_replace.OldFid;
+		  ViceFid *newfid = &out->cfs_replace.NewFid;
 		  clstats(CFS_REPLACE);
 		  CDEBUG(D_DOWNCALL, "CFS_REPLACE\n");
-		  inode = coda_fid_to_inode(fid, sb);
+		  inode = coda_fid_to_inode(oldfid, sb);
 		  if ( inode ) { 
 			  CDEBUG(D_DOWNCALL, "replacefid: inode = %ld\n", inode->i_ino);
-			  coda_purge_children(inode);
-                          coda_purge_dentries(inode);
+			  coda_replace_fid(inode, oldfid, newfid);
 		  }else 
 			  CDEBUG(D_DOWNCALL, "purgefid: no inode\n");
+		  
 		  return 0;
-	  }			   
+	  }
 	  }
 	  return 0;
 }

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