patch-2.3.1 linux/fs/lockd/svc.c

Next file: linux/fs/lockd/svcsubs.c
Previous file: linux/fs/lockd/host.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.3.0/linux/fs/lockd/svc.c linux/fs/lockd/svc.c
@@ -40,14 +40,14 @@
 
 extern struct svc_program	nlmsvc_program;
 struct nlmsvc_binding *		nlmsvc_ops = NULL;
-static struct semaphore 	nlmsvc_sema = MUTEX;
+static DECLARE_MUTEX(nlmsvc_sema);
 static unsigned int		nlmsvc_users = 0;
 static pid_t			nlmsvc_pid = 0;
 unsigned long			nlmsvc_grace_period = 0;
 unsigned long			nlmsvc_timeout = 0;
 
-static struct semaphore lockd_start = MUTEX_LOCKED;
-static struct wait_queue *	lockd_exit = NULL;
+static DECLARE_MUTEX_LOCKED(lockd_start);
+static DECLARE_WAIT_QUEUE_HEAD(lockd_exit);
 
 /*
  * Currently the following can be set only at insmod time.
@@ -319,10 +319,9 @@
 init_module(void)
 {
 	/* Init the static variables */
-	nlmsvc_sema = MUTEX;
+	init_MUTEX(&nlmsvc_sema);
 	nlmsvc_users = 0;
 	nlmsvc_pid = 0;
-	lockd_exit = NULL;
 	nlmxdr_init();
 	return 0;
 }

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