summaryrefslogtreecommitdiffstats
path: root/drivers/staging/lustre/lustre/ldlm/ldlm_lib.c
diff options
context:
space:
mode:
authorDmitry Eremin <dmitry.eremin@intel.com>2014-04-27 13:06:59 -0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2014-04-27 10:30:59 -0700
commit6246dab1d0d3a91614eb0360e51d9e98b919dbb1 (patch)
treecce58465829275f84305c28b6646b1fc4d13ce46 /drivers/staging/lustre/lustre/ldlm/ldlm_lib.c
parent5426ba66e1a802c74d11e76454f1151233e43bb1 (diff)
downloadop-kernel-dev-6246dab1d0d3a91614eb0360e51d9e98b919dbb1.zip
op-kernel-dev-6246dab1d0d3a91614eb0360e51d9e98b919dbb1.tar.gz
staging/lustre: replace semaphores with mutexes
It's just optimization. The mutex subsystem is slightly faster and has better scalability for contended workloads. Remove the lustre_lock and it's accessor functions l_lock(), l_unlock(), l_lock_init(), and l_has_lock() since they have not been used by the code since Lustre 1.6. Signed-off-by: Dmitry Eremin <dmitry.eremin@intel.com> Reviewed-on: http://review.whamcloud.com/9294 Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-4588 Reviewed-by: Andreas Dilger <andreas.dilger@intel.com> Reviewed-by: John L. Hammond <john.hammond@intel.com> Reviewed-by: James Simmons <uja.ornl@gmail.com> Reviewed-by: Alex Zhuravlev <alexey.zhuravlev@intel.com> Signed-off-by: Oleg Drokin <oleg.drokin@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/lustre/lustre/ldlm/ldlm_lib.c')
-rw-r--r--drivers/staging/lustre/lustre/ldlm/ldlm_lib.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/staging/lustre/lustre/ldlm/ldlm_lib.c b/drivers/staging/lustre/lustre/ldlm/ldlm_lib.c
index 42f5f1e..8bb5915 100644
--- a/drivers/staging/lustre/lustre/ldlm/ldlm_lib.c
+++ b/drivers/staging/lustre/lustre/ldlm/ldlm_lib.c
@@ -325,7 +325,7 @@ int client_obd_setup(struct obd_device *obddev, struct lustre_cfg *lcfg)
}
init_rwsem(&cli->cl_sem);
- sema_init(&cli->cl_mgc_sem, 1);
+ mutex_init(&cli->cl_mgc_mutex);
cli->cl_conn_count = 0;
memcpy(server_uuid.uuid, lustre_cfg_buf(lcfg, 2),
min_t(unsigned int, LUSTRE_CFG_BUFLEN(lcfg, 2),
OpenPOWER on IntegriCloud