patch-2.1.131 linux/fs/umsdos/check.c

Next file: linux/fs/umsdos/dir.c
Previous file: linux/fs/umsdos/README-WIP.txt
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.1.130/linux/fs/umsdos/check.c linux/fs/umsdos/check.c
@@ -66,10 +66,10 @@
 void check_sb (struct super_block *sb, const char c)
 {
 	if (sb) {
-		Printk ((" (has %c_sb=%d, %d)", 
-			c, MAJOR (sb->s_dev), MINOR (sb->s_dev)));
+		printk (" (has %c_sb=%d, %d)", 
+			c, MAJOR (sb->s_dev), MINOR (sb->s_dev));
 	} else {
-		Printk ((" (%c_sb is NULL)", c));
+		printk (" (%c_sb is NULL)", c);
 	}
 } 
 
@@ -81,35 +81,37 @@
 void check_inode (struct inode *inode)
 {
 	if (inode) {
-		Printk ((KERN_DEBUG "*   inode is %lu (i_count=%d)",
-			 inode->i_ino, inode->i_count));
+		printk (KERN_DEBUG "*   inode is %lu (i_count=%d)",
+			 inode->i_ino, inode->i_count);
 		check_sb (inode->i_sb, 'i');
 		
 		if (inode->i_dentry.next) {	/* FIXME: does this work ? */
-			Printk ((" (has i_dentry)"));
+			printk (" (has i_dentry)");
 		} else {
-			Printk ((" (NO i_dentry)"));
+			printk (" (NO i_dentry)");
 		}
 		
+		printk (" (i_patched=%d)", inode->u.umsdos_i.i_patched);
+		
 		if (inode->i_op == NULL) {
-			Printk ((" (i_op is NULL)\n"));
+			printk (" (i_op is NULL)\n");
 		} else if (inode->i_op == &umsdos_dir_inode_operations) {
-			Printk ((" (i_op is umsdos_dir_inode_operations)\n"));
+			printk (" (i_op is umsdos_dir_inode_operations)\n");
 		} else if (inode->i_op == &umsdos_file_inode_operations) {
-			Printk ((" (i_op is umsdos_file_inode_operations)\n"));
+			printk (" (i_op is umsdos_file_inode_operations)\n");
 		} else if (inode->i_op == &umsdos_file_inode_operations_no_bmap) {
-			Printk ((" (i_op is umsdos_file_inode_operations_no_bmap)\n"));
+			printk (" (i_op is umsdos_file_inode_operations_no_bmap)\n");
 		} else if (inode->i_op == &umsdos_file_inode_operations_readpage) {
-			Printk ((" (i_op is umsdos_file_inode_operations_readpage)\n"));
+			printk (" (i_op is umsdos_file_inode_operations_readpage)\n");
 		} else if (inode->i_op == &umsdos_rdir_inode_operations) {
-			Printk ((" (i_op is umsdos_rdir_inode_operations)\n"));
+			printk (" (i_op is umsdos_rdir_inode_operations)\n");
 		} else if (inode->i_op == &umsdos_symlink_inode_operations) {
-			Printk ((" (i_op is umsdos_symlink_inode_operations)\n"));
+			printk (" (i_op is umsdos_symlink_inode_operations)\n");
 		} else {
-			Printk ((" (i_op is UNKNOWN: %p)\n", inode->i_op));
+			printk ((" (i_op is UNKNOWN: %p)\n", inode->i_op));
 		}
 	} else {
-		Printk ((KERN_DEBUG "*   inode is NULL\n"));
+		printk (KERN_DEBUG "*   inode is NULL\n");
 	}
 }
 
@@ -127,40 +129,40 @@
 		return;
 	}
 
-	Printk ((KERN_DEBUG "checkd_inode:  inode %lu\n", inode->i_ino));
+	printk (KERN_DEBUG "checkd_inode:  inode %lu\n", inode->i_ino);
 	cur = inode->i_dentry.next;
 	while (count++ < 10) {
 		PRINTK (("1..."));
 		if (!cur) {
-			Printk ((KERN_ERR "checkd_inode: *** NULL reached. exit.\n"));
+			printk (KERN_ERR "checkd_inode: *** NULL reached. exit.\n");
 			return;
 		}
 		PRINTK (("2..."));
 		ret = list_entry (cur, struct dentry, d_alias);
 		PRINTK (("3..."));
 		if (cur == cur->next) {
-			Printk ((KERN_DEBUG "checkd_inode: *** cur=cur->next: normal exit.\n"));
+			printk (KERN_DEBUG "checkd_inode: *** cur=cur->next: normal exit.\n");
 			return;
 		}
 		PRINTK (("4..."));
 		if (!ret) {
-			Printk ((KERN_ERR "checkd_inode: *** ret dentry is NULL. exit.\n"));
+			printk (KERN_ERR "checkd_inode: *** ret dentry is NULL. exit.\n");
 			return;
 		}
 		PRINTK (("5... (ret=%p)...", ret));
 		PRINTK (("5.1.. (ret->d_dname=%p)...", &(ret->d_name)));
 		PRINTK (("5.1.1. (ret->d_dname.len=%d)...", (int) ret->d_name.len));
 		PRINTK (("5.1.2. (ret->d_dname.name=%c)...", ret->d_name.name));
-		Printk ((KERN_DEBUG "checkd_inode:   i_dentry is %.*s\n", (int) ret->d_name.len, ret->d_name.name));
+		printk (KERN_DEBUG "checkd_inode:   i_dentry is %.*s\n", (int) ret->d_name.len, ret->d_name.name);
 		PRINTK (("6..."));
 		cur = cur->next;
 		PRINTK (("7..."));
 #if 1
-		Printk ((KERN_DEBUG "checkd_inode: *** finished after count 1 (operator forced)\n"));
+		printk (KERN_DEBUG "checkd_inode: *** finished after count 1 (operator forced)\n");
 		return;
 #endif		
 	}
-	Printk ((KERN_ERR "checkd_inode: *** OVER LIMIT (loop?) !\n"));
+	printk (KERN_ERR "checkd_inode: *** OVER LIMIT (loop?) !\n");
 	return;
 }
 
@@ -172,19 +174,19 @@
 void check_dent_int (struct dentry *dentry, int parent)
 {
 	if (parent) {
-		Printk ((KERN_DEBUG "*  parent(%d) dentry: %.*s\n", 
-			parent, (int) dentry->d_name.len, dentry->d_name.name));
+		printk (KERN_DEBUG "*  parent(%d) dentry: %.*s\n", 
+			parent, (int) dentry->d_name.len, dentry->d_name.name);
 	} else {
-		Printk ((KERN_DEBUG "*  checking dentry: %.*s\n",
-			 (int) dentry->d_name.len, dentry->d_name.name));
+		printk (KERN_DEBUG "*  checking dentry: %.*s\n",
+			 (int) dentry->d_name.len, dentry->d_name.name);
 	}
 	check_inode (dentry->d_inode);
-	Printk ((KERN_DEBUG "*   d_count=%d", dentry->d_count));
+	printk (KERN_DEBUG "*   d_count=%d", dentry->d_count);
 	check_sb (dentry->d_sb, 'd');
 	if (dentry->d_op == NULL) {
-		Printk ((" (d_op is NULL)\n"));
+		printk (" (d_op is NULL)\n");
 	} else {
-		Printk ((" (d_op is UNKNOWN: %p)\n", dentry->d_op));
+		printk (" (d_op is UNKNOWN: %p)\n", dentry->d_op);
 	}
 }
 
@@ -196,35 +198,35 @@
 void check_dentry_path (struct dentry *dentry, const char *desc)
 {
 	int count=0;
-	Printk ((KERN_DEBUG "*** check_dentry_path: %.60s\n", desc));
+	printk (KERN_DEBUG "*** check_dentry_path: %.60s\n", desc);
 
 	if (!dentry) {
-		Printk ((KERN_DEBUG "*** checking dentry... it is NULL !\n"));
+		printk (KERN_DEBUG "*** checking dentry... it is NULL !\n");
 		return;
 	}
 	if (IS_ERR(dentry)) {
-		Printk ((KERN_DEBUG "*** checking dentry... it is ERR(%ld) !\n",
-			 PTR_ERR(dentry)));
+		printk (KERN_DEBUG "*** checking dentry... it is ERR(%ld) !\n",
+			 PTR_ERR(dentry));
 		return;
 	}
 	
 	while (dentry && count < 10) {
 		check_dent_int (dentry, count++);
 		if (dentry == dentry->d_parent) {
-			Printk ((KERN_DEBUG "*** end checking dentry (root reached ok)\n"));
+			printk (KERN_DEBUG "*** end checking dentry (root reached ok)\n");
 			break;
 		}
 		dentry = dentry->d_parent;
 	}
 
 	if (count >= 10) {	/* if infinite loop detected */
-		Printk ((KERN_ERR 
-			"*** WARNING ! INFINITE LOOP ! check_dentry_path aborted !\n"));
+		printk (KERN_ERR 
+			"*** WARNING ! INFINITE LOOP ! check_dentry_path aborted !\n");
 	}
 	
 	if (!dentry) {
-		Printk ((KERN_ERR 
-			"*** WARNING ! NULL dentry ! check_dentry_path aborted !\n"));
+		printk (KERN_ERR 
+			"*** WARNING ! NULL dentry ! check_dentry_path aborted !\n");
 	}
 }
 #else

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