patch-2.4.11-dontuse linux/fs/reiserfs/namei.c

Next file: linux/fs/reiserfs/objectid.c
Previous file: linux/fs/reiserfs/lbalance.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.4.10/linux/fs/reiserfs/namei.c linux/fs/reiserfs/namei.c
@@ -245,10 +245,8 @@
 	i --;
     }
 
-#ifdef CONFIG_REISERFS_CHECK
-    if (de->de_deh != B_I_DEH (de->de_bh, de->de_ih))
-	reiserfs_panic (0, "vs-7010: linear_search_in_dir_item: array of entry headers not found");
-#endif /* CONFIG_REISERFS_CHECK */
+    RFALSE( de->de_deh != B_I_DEH (de->de_bh, de->de_ih),
+	    "vs-7010: array of entry headers not found");
 
     deh += i;
 
@@ -290,11 +288,8 @@
 	// so, this is a bug
 	return NAME_NOT_FOUND;
 
-#ifdef CONFIG_REISERFS_CHECK
-    if (de->de_item_num)
-	reiserfs_panic (0, "vs-7015: linear_search_in_dir_item: "
-			"two diritems of the same directory in one node?");
-#endif /* CONFIG_REISERFS_CHECK */
+    RFALSE( de->de_item_num,
+	    "vs-7015: two diritems of the same directory in one node?");
 
     return GOTO_PREVIOUS_ITEM;
 }
@@ -533,7 +528,7 @@
     struct reiserfs_transaction_handle th ;
 
 
-    inode = get_empty_inode() ;
+    inode = new_inode(dir->i_sb) ;
     if (!inode) {
 	return -ENOMEM ;
     }
@@ -586,7 +581,7 @@
     struct reiserfs_transaction_handle th ;
     int jbegin_count = JOURNAL_PER_BALANCE_CNT * 3; 
 
-    inode = get_empty_inode() ;
+    inode = new_inode(dir->i_sb) ;
     if (!inode) {
 	return -ENOMEM ;
     }
@@ -638,7 +633,7 @@
     struct reiserfs_transaction_handle th ;
     int jbegin_count = JOURNAL_PER_BALANCE_CNT * 3; 
 
-    inode = get_empty_inode() ;
+    inode = new_inode(dir->i_sb) ;
     if (!inode) {
 	return -ENOMEM ;
     }
@@ -859,7 +854,7 @@
     int jbegin_count = JOURNAL_PER_BALANCE_CNT * 3; 
 
 
-    inode = get_empty_inode() ;
+    inode = new_inode(dir->i_sb) ;
     if (!inode) {
 	return -ENOMEM ;
     }
@@ -1149,14 +1144,9 @@
 	    continue;
 	}
 
-#ifdef CONFIG_REISERFS_CHECK
-	if (S_ISDIR(old_inode->i_mode) && 
-	    (!entry_points_to_object ("..", 2, &dot_dot_de, old_dir) || 
-	     !reiserfs_buffer_prepared(dot_dot_de.de_bh))) {
-	    // this should be not changed
-	    BUG ();
-	}
-#endif	
+	RFALSE( S_ISDIR(old_inode->i_mode) && 
+		(!entry_points_to_object ("..", 2, &dot_dot_de, old_dir) || 
+		 !reiserfs_buffer_prepared(dot_dot_de.de_bh)), "" );
 
 	break;
     }

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