afs/include/rxrpc transport.h,1.2,1.3 peer.h,1.3,1.4 message.h,1.3,1.4 connection.h,1.4,1.5 call.h,1.5,1.6

dwh at infradead.org dwh at infradead.org
Thu Mar 25 15:32:52 GMT 2004


Update of /home/cvs/afs/include/rxrpc
In directory phoenix.infradead.org:/tmp/cvs-serv24632/include/rxrpc

Modified Files:
	transport.h peer.h message.h connection.h call.h 
Log Message:
if () BUG() -> BUG_ON()


Index: transport.h
===================================================================
RCS file: /home/cvs/afs/include/rxrpc/transport.h,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- transport.h	15 Aug 2003 13:03:48 -0000	1.2
+++ transport.h	25 Mar 2004 15:32:49 -0000	1.3
@@ -85,8 +85,7 @@
 
 static inline void rxrpc_get_transport(struct rxrpc_transport *trans)
 {
-	if (atomic_read(&trans->usage) <= 0)
-		BUG();
+	BUG_ON(atomic_read(&trans->usage) <= 0);
 	atomic_inc(&trans->usage);
 	//printk("rxrpc_get_transport(%p{u=%d})\n",
 	//       trans, atomic_read(&trans->usage));

Index: peer.h
===================================================================
RCS file: /home/cvs/afs/include/rxrpc/peer.h,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- peer.h	15 Aug 2003 13:03:48 -0000	1.3
+++ peer.h	25 Mar 2004 15:32:49 -0000	1.4
@@ -72,8 +72,7 @@
 
 static inline void rxrpc_get_peer(struct rxrpc_peer *peer)
 {
-	if (atomic_read(&peer->usage)<0)
-		BUG();
+	BUG_ON(atomic_read(&peer->usage) < 0);
 	atomic_inc(&peer->usage);
 	//printk("rxrpc_get_peer(%p{u=%d})\n",peer,atomic_read(&peer->usage));
 }

Index: message.h
===================================================================
RCS file: /home/cvs/afs/include/rxrpc/message.h,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- message.h	13 Aug 2003 10:05:27 -0000	1.3
+++ message.h	25 Mar 2004 15:32:49 -0000	1.4
@@ -53,8 +53,7 @@
 extern void __rxrpc_put_message(struct rxrpc_message *msg);
 static inline void rxrpc_put_message(struct rxrpc_message *msg)
 {
-	if (atomic_read(&msg->usage)<=0)
-		BUG();
+	BUG_ON(atomic_read(&msg->usage) <= 0);
 	if (atomic_dec_and_test(&msg->usage))
 		__rxrpc_put_message(msg);
 }

Index: connection.h
===================================================================
RCS file: /home/cvs/afs/include/rxrpc/connection.h,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- connection.h	15 Aug 2003 13:03:48 -0000	1.4
+++ connection.h	25 Mar 2004 15:32:49 -0000	1.5
@@ -67,8 +67,7 @@
 
 static inline void rxrpc_get_connection(struct rxrpc_connection *conn)
 {
-	if (atomic_read(&conn->usage)<0)
-		BUG();
+	BUG_ON(atomic_read(&conn->usage) < 0);
 	atomic_inc(&conn->usage);
 	//printk("rxrpc_get_conn(%p{u=%d})\n",conn,atomic_read(&conn->usage));
 }

Index: call.h
===================================================================
RCS file: /home/cvs/afs/include/rxrpc/call.h,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- call.h	13 Aug 2003 10:05:27 -0000	1.5
+++ call.h	25 Mar 2004 15:32:49 -0000	1.6
@@ -187,8 +187,7 @@
 
 static inline void rxrpc_get_call(struct rxrpc_call *call)
 {
-	if (atomic_read(&call->usage)<=0)
-		BUG();
+	BUG_ON(atomic_read(&call->usage) <= 0);
 	atomic_inc(&call->usage);
 	/*printk("rxrpc_get_call(%p{u=%d})\n",(C),atomic_read(&(C)->usage));*/
 }




More information about the linux-afs-cvs mailing list