reiser4: remove unneeded assertions, make gcc happy.
PATCH 1/1 reiser4: remove unneeded assertions, make gcc happy.
Signed-off-by Edward Shishkin <[email protected]>
--- debug.h | 10 ++++++---- jnode.c | 12 ------------ plugin/txmod.c | 1 - znode.c | 1 - 4 files changed, 6 insertions(+), 18 deletions(-)
debug.h +6 -4
@@ -9,10 +9,12 @@#include "forward.h" #include "reiser4.h" -/* generic function to produce formatted output, decorating it with -whatever standard prefixes/postfixes we want. "Fun" is a function -that will be actually called, can be printk, panic etc. -This is for use by other debugging macros, not by users. */ +/** +* generic function to produce formatted output, decorating it with +* whatever standard prefixes/postfixes we want. "Fun" is a function +* that will be actually called, can be printk, panic etc. +* This is for use by other debugging macros, not by users. +*/ #define DCALL (lev, fun, reperr, label, format, ...) \ ({ \ fun(lev "reiser4[%.16s(%i)]: %s (%s:%i)[%s]:\n" format "\n" , \
jnode.c +0 -12
@@ -249,8 +249,6 @@ void done_jnodes(void)/* Initialize a jnode. */ void jnode_init (jnode *node,reiser4_subvol *subv,jnode_type type) { -assert ("umka-175" , node !=NULL ); -memset (node,0 ,sizeof (jnode));ON_DEBUG (node->magic =JMAGIC );jnode_set_type (node, type);
@@ -296,7 +294,6 @@ static void jnode_done(jnode *node)/* return already existing jnode of page */ jnode *jnode_by_page (struct page *pg) { -assert ("nikita-2066" , pg !=NULL );assert ("nikita-2400" ,PageLocked (pg));assert ("nikita-2068" ,PagePrivate (pg));assert ("nikita-2067" ,jprivate (pg) !=NULL );
@@ -313,8 +310,6 @@ jnode *jalloc(void)/* return jnode back to the slab allocator */ inline void jfree (jnode * node) { -assert ("zam-449" , node !=NULL ); -assert ("nikita-2663" , (list_empty_careful (&node->capture_link) &&NODE_LIST (node) ==NOT_CAPTURED ));assert ("nikita-3222" ,list_empty (&node->jnodes));
@@ -389,8 +384,6 @@ jnode *jlookup(reiser4_tree * tree, oid_t objectid, unsigned long index)struct jnode_key jkey;jnode *node; -assert ("nikita-2353" , tree !=NULL ); - jkey.objectid = objectid; jkey.index = index;
@@ -654,7 +647,6 @@ jnode *jnode_of_page(struct page *pg, int for_io)jnode *result;reiser4_subvol *subv; -assert ("umka-176" , pg !=NULL );assert ("nikita-2394" ,PageLocked (pg));if (for_io)
@@ -710,9 +702,7 @@ void jnode_attach_page(jnode * node, struct page *pg)/* Dual to jnode_attach_page: break a binding between page and jnode */ void page_clear_jnode (struct page *page,jnode * node) { -assert ("nikita-2424" , page !=NULL );assert ("nikita-2425" ,PageLocked (page)); -assert ("nikita-2426" , node !=NULL );assert_spin_locked (&(node->guard));assert ("nikita-2428" ,PagePrivate (page));
@@ -1156,7 +1146,6 @@ int jwait_io(jnode * node, int rw)struct page *page;int result; -assert ("zam-447" , node !=NULL );assert ("zam-448" ,jnode_page (node) !=NULL ); page =jnode_page (node);
@@ -1799,7 +1788,6 @@ void unpin_jnode_data(jnode * node)struct address_space *jnode_get_mapping (const jnode * node) { -assert ("nikita-3162" , node !=NULL );return jnode_ops (node)->mapping (node); }
plugin/txmod.c +0 -1
@@ -107,7 +107,6 @@ void jnode_make_wander_nolock(jnode * node) {txn_atom *atom; -assert ("nikita-2431" , node !=NULL );assert ("nikita-2432" , !JF_ISSET (node,JNODE_RELOC ));assert ("nikita-3153" ,JF_ISSET (node,JNODE_DIRTY ));assert ("zam-897" , !JF_ISSET (node,JNODE_FLUSH_QUEUED ));
znode.c +0 -1
@@ -787,7 +787,6 @@ static int znode_is_true_root(const znode *node)/* check that @node is root */ int znode_is_root (const znode *node) { -assert ("nikita-1206" , node !=NULL );assert ("edward-1804" ,znode_get_subvol (node) !=NULL );return znode_get_level (node) ==znode_get_tree (node)->height;
Signature · 1 line
2.7.4