diff options
author | Ksenija Stanojevic <ksenija.stanojevic@gmail.com> | 2015-10-17 18:19:46 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2015-10-18 05:16:37 +0200 |
commit | d811ed6974532cdb47301ba993f766c6e5b3fd5d (patch) | |
tree | 042ba7993d51df5e02b33030a3140c79408bb723 | |
parent | Staging: lustre: include: Convert macro class_export_lock_get into static inl... (diff) | |
download | linux-d811ed6974532cdb47301ba993f766c6e5b3fd5d.tar.xz linux-d811ed6974532cdb47301ba993f766c6e5b3fd5d.zip |
Staging: lustre: include: Convert macro class_export_lock_put into static inline function
Static inline functions are preferred over macros. This change is safe
because the types of arguments at all the call sites are same.
Signed-off-by: Ksenija Stanojevic <ksenija.stanojevic@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r-- | drivers/staging/lustre/lustre/include/obd_class.h | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/drivers/staging/lustre/lustre/include/obd_class.h b/drivers/staging/lustre/lustre/include/obd_class.h index ea2b66764a3d..f5d0a98b73f0 100644 --- a/drivers/staging/lustre/lustre/include/obd_class.h +++ b/drivers/staging/lustre/lustre/include/obd_class.h @@ -233,15 +233,16 @@ static inline struct obd_export *class_export_lock_get(struct obd_export *exp, return class_export_get(exp); } -#define class_export_lock_put(exp, lock) \ -({ \ - LASSERT_ATOMIC_POS(&exp->exp_locks_count); \ - atomic_dec(&(exp)->exp_locks_count); \ - __class_export_del_lock_ref(exp, lock); \ - CDEBUG(D_INFO, "lock PUTting export %p : new locks_count %d\n", \ - (exp), atomic_read(&(exp)->exp_locks_count)); \ - class_export_put(exp); \ -}) +static inline void class_export_lock_put(struct obd_export *exp, + struct ldlm_lock *lock) +{ + LASSERT_ATOMIC_POS(&exp->exp_locks_count); + atomic_dec(&(exp)->exp_locks_count); + __class_export_del_lock_ref(exp, lock); + CDEBUG(D_INFO, "lock PUTting export %p : new locks_count %d\n", + (exp), atomic_read(&(exp)->exp_locks_count)); + class_export_put(exp); +} #define class_export_cb_get(exp) \ ({ \ |