summaryrefslogtreecommitdiffstats
path: root/drivers/staging/lustre/lustre/ldlm/l_lock.c
diff options
context:
space:
mode:
authorOleg Drokin <green@linuxhacker.ru>2015-10-01 00:12:37 -0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2015-10-02 11:17:19 +0200
commit71570b98e35d9f00a5ee9936204e5d7c380491d6 (patch)
tree3319b281c59b7cb5fbfa244db37f11e6616389a8 /drivers/staging/lustre/lustre/ldlm/l_lock.c
parentcf739f84a326d009670ba5c2d8d7b63216722ffc (diff)
downloadop-kernel-dev-71570b98e35d9f00a5ee9936204e5d7c380491d6.zip
op-kernel-dev-71570b98e35d9f00a5ee9936204e5d7c380491d6.tar.gz
staging/lustre: Remove ns_is_server()
Since the code we have is Lustre-client only, this function always returns 0, so drop it and amend all the callsites to drop dead code. One of the places also sets LDLM_FL_NS_SRV to indicate a lock is in a server namespace. This too cannot happen in this code, so drop all such checks as well. Signed-off-by: Oleg Drokin <green@linuxhacker.ru> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/lustre/lustre/ldlm/l_lock.c')
-rw-r--r--drivers/staging/lustre/lustre/ldlm/l_lock.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/drivers/staging/lustre/lustre/ldlm/l_lock.c b/drivers/staging/lustre/lustre/ldlm/l_lock.c
index cd8ab40..e5d1344 100644
--- a/drivers/staging/lustre/lustre/ldlm/l_lock.c
+++ b/drivers/staging/lustre/lustre/ldlm/l_lock.c
@@ -50,9 +50,7 @@
*/
struct ldlm_resource *lock_res_and_lock(struct ldlm_lock *lock)
{
- /* on server-side resource of lock doesn't change */
- if ((lock->l_flags & LDLM_FL_NS_SRV) == 0)
- spin_lock(&lock->l_lock);
+ spin_lock(&lock->l_lock);
lock_res(lock->l_resource);
@@ -70,7 +68,6 @@ void unlock_res_and_lock(struct ldlm_lock *lock)
lock->l_flags &= ~LDLM_FL_RES_LOCKED;
unlock_res(lock->l_resource);
- if ((lock->l_flags & LDLM_FL_NS_SRV) == 0)
- spin_unlock(&lock->l_lock);
+ spin_unlock(&lock->l_lock);
}
EXPORT_SYMBOL(unlock_res_and_lock);
OpenPOWER on IntegriCloud