patch-2.2.11 linux/fs/coda/dir.c

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

diff -u --recursive --new-file v2.2.10/linux/fs/coda/dir.c linux/fs/coda/dir.c
@@ -124,12 +124,12 @@
 
 	if ( length > CODA_MAXNAMLEN ) {
 	        printk("name too long: lookup, %s (%*s)\n", 
-		       coda_f2s(&dircnp->c_fid), length, name);
+		       coda_f2s(&dircnp->c_fid), (int)length, name);
 		return ERR_PTR(-ENAMETOOLONG);
 	}
 
-        CDEBUG(D_INODE, "name %s, len %d in ino %ld, fid %s\n", 
-	       name, length, dir->i_ino, coda_f2s(&dircnp->c_fid));
+        CDEBUG(D_INODE, "name %s, len %ld in ino %ld, fid %s\n", 
+	       name, (long)length, dir->i_ino, coda_f2s(&dircnp->c_fid));
 
         /* control object, create inode on the fly */
         if (coda_isroot(dir) && coda_iscontrol(name, length)) {
@@ -156,7 +156,7 @@
 			return ERR_PTR(error);
 	} else if (error != -ENOENT) {
 	        CDEBUG(D_INODE, "error for %s(%*s)%d\n",
-		       coda_f2s(&dircnp->c_fid), length, name, error);
+		       coda_f2s(&dircnp->c_fid), (int)length, name, error);
 		return ERR_PTR(error);
 	}
 	CDEBUG(D_INODE, "lookup: %s is (%s), type %d result %d, dropme %d\n",
@@ -503,10 +503,10 @@
         old_cnp = ITOC(old_dir);
         new_cnp = ITOC(new_dir);
 
-        CDEBUG(D_INODE, "old: %s, (%d length, %d strlen), new: %s"
-	       "(%d length, %d strlen).old:d_count: %d, new:d_count: %d\n", 
-	       old_name, old_length, strlen(old_name), new_name, new_length, 
-	       strlen(new_name),old_dentry->d_count, new_dentry->d_count);
+        CDEBUG(D_INODE, "old: %s, (%d length, %ld strlen), new: %s"
+	       "(%d length, %ld strlen).old:d_count: %d, new:d_count: %d\n", 
+	       old_name, old_length, (long)strlen(old_name), new_name, new_length, 
+	       (long)strlen(new_name),old_dentry->d_count, new_dentry->d_count);
 
 	/* the C library will do unlink/create etc */
 	if ( coda_crossvol_rename == 0 && 
@@ -593,12 +593,12 @@
 	error = venus_open(i->i_sb, &(cnp->c_fid), coda_flags, &ino, &dev); 
 	if (error) {
 	        CDEBUG(D_FILE, "venus: dev %d, inode %ld, out->result %d\n",
-		       dev, ino, error);
+		       dev, (long)ino, error);
 		return error;
 	}
 
         /* coda_upcall returns ino number of cached object, get inode */
-        CDEBUG(D_FILE, "cache file dev %d, ino %ld\n", dev, ino);
+        CDEBUG(D_FILE, "cache file dev %d, ino %ld\n", dev, (long)ino);
 	error = coda_inode_grab(dev, ino, &cont_inode);
 	
 	if ( error || !cont_inode ){
@@ -621,9 +621,9 @@
 
         CDEBUG(D_FILE, "result %d, coda i->i_count is %d for ino %ld\n", 
 	       error, i->i_count, i->i_ino);
-        CDEBUG(D_FILE, "cache ino: %ld, count %d, ops %x\n", 
+        CDEBUG(D_FILE, "cache ino: %ld, count %d, ops %p\n", 
 	       cnp->c_ovp->i_ino, cnp->c_ovp->i_count,
-	       (int)(cnp->c_ovp->i_op));
+	       (cnp->c_ovp->i_op));
         EXIT;
         return 0;
 }
@@ -799,16 +799,16 @@
 
 	shrink_dcache_parent(de);
 
+	/* propagate for a flush */
+	if (cii->c_flags & C_FLUSH) 
+		coda_flag_inode_children(inode, C_FLUSH);
+
 	if (de->d_count > 1) {
 		/* pretend it's valid, but don't change the flags */
 		CDEBUG(D_DOWNCALL, "BOOM for: ino %ld, %s\n",
 		       de->d_inode->i_ino, coda_f2s(&cii->c_fid));
 		return 1;
 	}
-
-	/* propagate for a flush */
-	if (cii->c_flags & C_FLUSH) 
-		coda_flag_inode_children(inode, C_FLUSH);
 
 	/* clear the flags. */
 	cii->c_flags &= ~(C_VATTR | C_PURGE | C_FLUSH);

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