patch-2.4.9 linux/net/sunrpc/auth_null.c

Next file: linux/net/sunrpc/auth_unix.c
Previous file: linux/net/sunrpc/auth.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.4.8/linux/net/sunrpc/auth_null.c linux/net/sunrpc/auth_null.c
@@ -17,6 +17,8 @@
 # define RPCDBG_FACILITY	RPCDBG_AUTH
 #endif
 
+static struct rpc_credops	null_credops;
+
 static struct rpc_auth *
 nul_create(struct rpc_clnt *clnt)
 {
@@ -52,9 +54,10 @@
 
 	if (!(cred = (struct rpc_cred *) rpc_allocate(flags, sizeof(*cred))))
 		return NULL;
-	cred->cr_count = 0;
+	atomic_set(&cred->cr_count, 0);
 	cred->cr_flags = RPCAUTH_CRED_UPTODATE;
 	cred->cr_uid = current->uid;
+	cred->cr_ops = &null_credops;
 
 	return cred;
 }
@@ -124,7 +127,11 @@
 #endif
 	nul_create,
 	nul_destroy,
-	nul_create_cred,
+	nul_create_cred
+};
+
+static
+struct rpc_credops	null_credops = {
 	nul_destroy_cred,
 	nul_match,
 	nul_marshal,

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