Commit edc6a40e authored by Ksenija Stanojevic's avatar Ksenija Stanojevic Committed by Greg Kroah-Hartman

Staging: lustre: include: Convert macro class_export_lock_get 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: default avatarKsenija Stanojevic <ksenija.stanojevic@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent a1d825e9
...@@ -223,14 +223,15 @@ static inline void class_export_rpc_dec(struct obd_export *exp) ...@@ -223,14 +223,15 @@ static inline void class_export_rpc_dec(struct obd_export *exp)
(exp), atomic_read(&(exp)->exp_rpc_count)); (exp), atomic_read(&(exp)->exp_rpc_count));
} }
#define class_export_lock_get(exp, lock) \ static inline struct obd_export *class_export_lock_get(struct obd_export *exp,
({ \ struct ldlm_lock *lock)
atomic_inc(&(exp)->exp_locks_count); \ {
__class_export_add_lock_ref(exp, lock); \ atomic_inc(&(exp)->exp_locks_count);
CDEBUG(D_INFO, "lock GETting export %p : new locks_count %d\n", \ __class_export_add_lock_ref(exp, lock);
(exp), atomic_read(&(exp)->exp_locks_count)); \ CDEBUG(D_INFO, "lock GETting export %p : new locks_count %d\n",
class_export_get(exp); \ (exp), atomic_read(&(exp)->exp_locks_count));
}) return class_export_get(exp);
}
#define class_export_lock_put(exp, lock) \ #define class_export_lock_put(exp, lock) \
({ \ ({ \
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment