aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/staging/lustre/lustre/libcfs/module.c
diff options
context:
space:
mode:
authorJames Simmons <jsimmons@infradead.org>2015-06-03 18:38:06 -0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2015-06-08 12:39:01 -0700
commit2f4246f71d4f302ae57aae804c88fffc4b0478b5 (patch)
treeb682ba776b10566dcc830fd9177da9f938d2f1c9 /drivers/staging/lustre/lustre/libcfs/module.c
parentstaging:lustre: fixup LNet resource container api (diff)
downloadlinux-dev-2f4246f71d4f302ae57aae804c88fffc4b0478b5.tar.xz
linux-dev-2f4246f71d4f302ae57aae804c88fffc4b0478b5.zip
staging:lustre: cleanup libcfs lock handling
Previously with libcfs being built for user land and kernel space wrappers were created to transparently handle locking. Now that user land support has been removed we delete all those locking wrappers with this patch. Many of those changes landed upstream but some nice cleanups still remain that are pushed in this patch. Signed-off-by: James Simmons <uja.ornl@gmail.com> Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-6245 Reviewed-on: http://review.whamcloud.com/13793 Reviewed-by: Dmitry Eremin <dmitry.eremin@intel.com> Reviewed-by: John L. Hammond <john.hammond@intel.com> Reviewed-by: Andreas Dilger <andreas.dilger@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/lustre/lustre/libcfs/module.c')
-rw-r--r--drivers/staging/lustre/lustre/libcfs/module.c11
1 files changed, 2 insertions, 9 deletions
diff --git a/drivers/staging/lustre/lustre/libcfs/module.c b/drivers/staging/lustre/lustre/libcfs/module.c
index 83b1a708b1e3..e60b2e9b9194 100644
--- a/drivers/staging/lustre/lustre/libcfs/module.c
+++ b/drivers/staging/lustre/lustre/libcfs/module.c
@@ -66,8 +66,6 @@ MODULE_DESCRIPTION("Portals v3.1");
MODULE_LICENSE("GPL");
extern struct miscdevice libcfs_dev;
-extern struct rw_semaphore cfs_tracefile_sem;
-extern struct mutex cfs_trace_thread_mutex;
extern struct cfs_wi_sched *cfs_sched_rehash;
extern void libcfs_init_nidstrings(void);
@@ -248,8 +246,8 @@ static int libcfs_psdev_release(unsigned long flags, void *args)
return 0;
}
-static struct rw_semaphore ioctl_list_sem;
-static struct list_head ioctl_list;
+static DECLARE_RWSEM(ioctl_list_sem);
+static LIST_HEAD(ioctl_list);
int libcfs_register_ioctl(struct libcfs_ioctl_handler *hand)
{
@@ -392,11 +390,6 @@ static int init_libcfs_module(void)
libcfs_arch_init();
libcfs_init_nidstrings();
- init_rwsem(&cfs_tracefile_sem);
- mutex_init(&cfs_trace_thread_mutex);
- init_rwsem(&ioctl_list_sem);
- INIT_LIST_HEAD(&ioctl_list);
- init_waitqueue_head(&cfs_race_waitq);
rc = libcfs_debug_init(5 * 1024 * 1024);
if (rc < 0) {