diff options
author | Ksenija Stanojevic <ksenija.stanojevic@gmail.com> | 2015-10-17 18:18:34 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2015-10-17 20:16:37 -0700 |
commit | edc6a40e3a75650be003be0e35a54f3edc6b4f7e (patch) | |
tree | 35c5c4e5b1ea17101bfe5906b9bcbec4056374a6 /drivers/staging/lustre | |
parent | a1d825e9376b7c3c9a3eaa26d14bb74c3c3ff2d0 (diff) |
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: Ksenija Stanojevic <ksenija.stanojevic@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/lustre')
-rw-r--r-- | drivers/staging/lustre/lustre/include/obd_class.h | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/drivers/staging/lustre/lustre/include/obd_class.h b/drivers/staging/lustre/lustre/include/obd_class.h index 0b4cdbcbadbd..ea2b66764a3d 100644 --- a/drivers/staging/lustre/lustre/include/obd_class.h +++ b/drivers/staging/lustre/lustre/include/obd_class.h @@ -223,14 +223,15 @@ static inline void class_export_rpc_dec(struct obd_export *exp) (exp), atomic_read(&(exp)->exp_rpc_count)); } -#define class_export_lock_get(exp, lock) \ -({ \ - atomic_inc(&(exp)->exp_locks_count); \ - __class_export_add_lock_ref(exp, lock); \ - CDEBUG(D_INFO, "lock GETting export %p : new locks_count %d\n", \ - (exp), atomic_read(&(exp)->exp_locks_count)); \ - class_export_get(exp); \ -}) +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); + CDEBUG(D_INFO, "lock GETting export %p : new locks_count %d\n", + (exp), atomic_read(&(exp)->exp_locks_count)); + return class_export_get(exp); +} #define class_export_lock_put(exp, lock) \ ({ \ |