Subject: [PATCH] llc: remove MOD_{INC,DEC}_USE_COUNT

From: Arnaldo Carvalho de Melo <[email-masked]>
Date: Sun, 27 Apr 2003 12:18:25 -0300

Hi David,

	Please pull from:

bk://kernel.bkbits.net/acme/net-2.5

	Now there are three outstanding changesets in this tree.

- Arnaldo

You can import this changeset into BK by piping this whole message to:
'| bk receive [path to repository]' or apply the patch as usual.

===================================================================

[email-masked], 2003-04-27 12:04:25-03:00, [email-masked]
  o llc: remove MOD_{INC,DEC}_USE_COUNT
  
  Now the core networking infrastructure will (finally) do that for the net
  protocol families, its just a matter of setting the ->owner field in the
  registered struct net_proto_family to THIS_MODULE.

 llc_if.c   |    9 ++-------
 llc_main.c |    6 +-----
 2 files changed, 3 insertions(+), 12 deletions(-)

diff -Nru a/net/llc/llc_if.c b/net/llc/llc_if.c
--- a/net/llc/llc_if.c	Sun Apr 27 12:14:09 2003
+++ b/net/llc/llc_if.c	Sun Apr 27 12:14:09 2003
@@ -43,16 +43,15 @@
 	/* verify this SAP is not already open; if so, return error */
 	struct llc_sap *sap;
 
-	MOD_INC_USE_COUNT;
 	sap = llc_sap_find(lsap);
 	if (sap) { /* SAP already exists */
 		sap = NULL;
-		goto err;
+		goto out;
 	}
 	/* sap requested does not yet exist */
 	sap = llc_sap_alloc();
 	if (!sap)
-		goto err;
+		goto out;
 	/* allocated a SAP; initialize it and clear out its memory pool */
 	sap->laddr.lsap = lsap;
 	sap->rcv_func	= func;
@@ -61,9 +60,6 @@
 	llc_sap_save(sap);
 out:
 	return sap;
-err:
-	MOD_DEC_USE_COUNT;
-	goto out;
 }
 
 /**
@@ -76,7 +72,6 @@
 void llc_sap_close(struct llc_sap *sap)
 {
 	llc_free_sap(sap);
-	MOD_DEC_USE_COUNT;
 }
 
 /**
diff -Nru a/net/llc/llc_main.c b/net/llc/llc_main.c
--- a/net/llc/llc_main.c	Sun Apr 27 12:14:09 2003
+++ b/net/llc/llc_main.c	Sun Apr 27 12:14:09 2003
@@ -224,9 +224,8 @@
 {
 	struct sock *sk = sk_alloc(family, priority, 1, NULL);
 
-	MOD_INC_USE_COUNT;
 	if (!sk)
-		goto decmod;
+		goto out;
 	if (llc_sk_init(sk))
 		goto outsk;
 	sock_init_data(NULL, sk);
@@ -240,8 +239,6 @@
 outsk:
 	sk_free(sk);
 	sk = NULL;
-decmod:
-	MOD_DEC_USE_COUNT;
 	goto out;
 }
 
@@ -279,7 +276,6 @@
 	}
 #endif
 	sock_put(sk);
-	MOD_DEC_USE_COUNT;
 }
 
 /**

===================================================================

This BitKeeper patch contains the following changesets:
1.1125
## Wrapped with gzip_uu ##

A#4!=%]):L[_^A-1<J]MRD0TPE[X*!$,_ <\0_E9V"0