From 4fb011ca71a652d945207e939be60ad41da30626 Mon Sep 17 00:00:00 2001 From: Mark Fasheh Date: Wed, 23 Aug 2017 22:18:42 -0500 Subject: [PATCH] scoutfs: export ocfs2_cluster_(un)lock from dlmglue.c This is what we'll want to build our scoutfs locks on. Signed-off-by: Mark Fasheh --- kmod/src/dlmglue.c | 15 +++++++-------- kmod/src/dlmglue.h | 5 +++++ 2 files changed, 12 insertions(+), 8 deletions(-) diff --git a/kmod/src/dlmglue.c b/kmod/src/dlmglue.c index 1e8fce4d..cbeab58e 100644 --- a/kmod/src/dlmglue.c +++ b/kmod/src/dlmglue.c @@ -377,9 +377,8 @@ static inline int ocfs2_may_continue_on_blocked_lock(struct ocfs2_lock_res *lock static void __ocfs2_cluster_unlock(struct ocfs2_super *osb, struct ocfs2_lock_res *lockres, int level, unsigned long caller_ip); -static inline void ocfs2_cluster_unlock(struct ocfs2_super *osb, - struct ocfs2_lock_res *lockres, - int level) +void ocfs2_cluster_unlock(struct ocfs2_super *osb, + struct ocfs2_lock_res *lockres, int level) { __ocfs2_cluster_unlock(osb, lockres, level, _RET_IP_); } @@ -1671,11 +1670,11 @@ out: return ret; } -static inline int ocfs2_cluster_lock(struct ocfs2_super *osb, - struct ocfs2_lock_res *lockres, - int level, - u32 lkm_flags, - int arg_flags) +int ocfs2_cluster_lock(struct ocfs2_super *osb, + struct ocfs2_lock_res *lockres, + int level, + u32 lkm_flags, + int arg_flags) { return __ocfs2_cluster_lock(osb, lockres, level, lkm_flags, arg_flags, 0, _RET_IP_); diff --git a/kmod/src/dlmglue.h b/kmod/src/dlmglue.h index fc9508e0..b81c65e4 100644 --- a/kmod/src/dlmglue.h +++ b/kmod/src/dlmglue.h @@ -241,6 +241,11 @@ enum { OI_LS_REFLINK_TARGET, }; +int ocfs2_cluster_lock(struct ocfs2_super *osb, struct ocfs2_lock_res *lockres, + int level, u32 lkm_flags, int arg_flags); +void ocfs2_cluster_unlock(struct ocfs2_super *osb, + struct ocfs2_lock_res *lockres, int level); + int ocfs2_dlm_init(struct ocfs2_super *osb, char *cluster_stack, char *cluster_name, char *ls_name, struct dentry *debug_root); void ocfs2_dlm_shutdown(struct ocfs2_super *osb, int hangup_pending);