summaryrefslogtreecommitdiffstats
path: root/drivers/staging/lustre/lustre/ldlm/l_lock.c
diff options
context:
space:
mode:
authorBruce Korb <bruce.korb@gmail.com>2016-04-27 18:20:57 -0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2016-04-28 21:51:58 -0700
commit5a9a80baa78e730a27ea68e9ac8adbd86a23ec22 (patch)
treeb567a0de166a08a612f985d14497943b164b3580 /drivers/staging/lustre/lustre/ldlm/l_lock.c
parent0fdd2b8d7cec9fc4e4b6d0e7db2de98148ca37ba (diff)
downloadop-kernel-dev-5a9a80baa78e730a27ea68e9ac8adbd86a23ec22.zip
op-kernel-dev-5a9a80baa78e730a27ea68e9ac8adbd86a23ec22.tar.gz
staging: lustre: ldlm: use accessor macros for l_flags
Convert most of the ldlm lock's l_flags references from direct bit twiddling to using bit specific macros. A few multi-bit operations are left as an exercise for the reader. The changes are mostly in ldlm, but also in llite, osc and quota. Also add a multi-bit (mask) test. Signed-off-by: Bruce Korb <bruce.korb@gmail.com> Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-2906 Reviewed-by: Keith Mannthey <Keith.Mannthey@intel.com> Reviewed-on: http://review.whamcloud.com/7963 Reviewed-by: Doug Oucharek <doug.s.oucharek@intel.com> Reviewed-by: Andreas Dilger <andreas.dilger@intel.com> Signed-off-by: James Simmons <jsimmons@infradead.org> 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.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/staging/lustre/lustre/ldlm/l_lock.c b/drivers/staging/lustre/lustre/ldlm/l_lock.c
index e5d1344..621323f 100644
--- a/drivers/staging/lustre/lustre/ldlm/l_lock.c
+++ b/drivers/staging/lustre/lustre/ldlm/l_lock.c
@@ -54,7 +54,7 @@ struct ldlm_resource *lock_res_and_lock(struct ldlm_lock *lock)
lock_res(lock->l_resource);
- lock->l_flags |= LDLM_FL_RES_LOCKED;
+ ldlm_set_res_locked(lock);
return lock->l_resource;
}
EXPORT_SYMBOL(lock_res_and_lock);
@@ -65,7 +65,7 @@ EXPORT_SYMBOL(lock_res_and_lock);
void unlock_res_and_lock(struct ldlm_lock *lock)
{
/* on server-side resource of lock doesn't change */
- lock->l_flags &= ~LDLM_FL_RES_LOCKED;
+ ldlm_clear_res_locked(lock);
unlock_res(lock->l_resource);
spin_unlock(&lock->l_lock);
OpenPOWER on IntegriCloud