aboutsummaryrefslogtreecommitdiffstats
path: root/fs/ocfs2/stackglue.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/ocfs2/stackglue.c')
-rw-r--r--fs/ocfs2/stackglue.c17
1 files changed, 11 insertions, 6 deletions
diff --git a/fs/ocfs2/stackglue.c b/fs/ocfs2/stackglue.c
index 3500d9839d76..8ef9a574315e 100644
--- a/fs/ocfs2/stackglue.c
+++ b/fs/ocfs2/stackglue.c
@@ -240,47 +240,52 @@ EXPORT_SYMBOL_GPL(ocfs2_stack_glue_set_locking_protocol);
240 */ 240 */
241int ocfs2_dlm_lock(struct ocfs2_cluster_connection *conn, 241int ocfs2_dlm_lock(struct ocfs2_cluster_connection *conn,
242 int mode, 242 int mode,
243 union ocfs2_dlm_lksb *lksb, 243 struct ocfs2_dlm_lksb *lksb,
244 u32 flags, 244 u32 flags,
245 void *name, 245 void *name,
246 unsigned int namelen) 246 unsigned int namelen)
247{ 247{
248 BUG_ON(lproto == NULL); 248 BUG_ON(lproto == NULL);
249 249
250 if (!lksb->lksb_conn)
251 lksb->lksb_conn = conn;
252 else
253 BUG_ON(lksb->lksb_conn != conn);
250 return active_stack->sp_ops->dlm_lock(conn, mode, lksb, flags, 254 return active_stack->sp_ops->dlm_lock(conn, mode, lksb, flags,
251 name, namelen); 255 name, namelen);
252} 256}
253EXPORT_SYMBOL_GPL(ocfs2_dlm_lock); 257EXPORT_SYMBOL_GPL(ocfs2_dlm_lock);
254 258
255int ocfs2_dlm_unlock(struct ocfs2_cluster_connection *conn, 259int ocfs2_dlm_unlock(struct ocfs2_cluster_connection *conn,
256 union ocfs2_dlm_lksb *lksb, 260 struct ocfs2_dlm_lksb *lksb,
257 u32 flags) 261 u32 flags)
258{ 262{
259 BUG_ON(lproto == NULL); 263 BUG_ON(lproto == NULL);
264 BUG_ON(lksb->lksb_conn == NULL);
260 265
261 return active_stack->sp_ops->dlm_unlock(conn, lksb, flags); 266 return active_stack->sp_ops->dlm_unlock(conn, lksb, flags);
262} 267}
263EXPORT_SYMBOL_GPL(ocfs2_dlm_unlock); 268EXPORT_SYMBOL_GPL(ocfs2_dlm_unlock);
264 269
265int ocfs2_dlm_lock_status(union ocfs2_dlm_lksb *lksb) 270int ocfs2_dlm_lock_status(struct ocfs2_dlm_lksb *lksb)
266{ 271{
267 return active_stack->sp_ops->lock_status(lksb); 272 return active_stack->sp_ops->lock_status(lksb);
268} 273}
269EXPORT_SYMBOL_GPL(ocfs2_dlm_lock_status); 274EXPORT_SYMBOL_GPL(ocfs2_dlm_lock_status);
270 275
271int ocfs2_dlm_lvb_valid(union ocfs2_dlm_lksb *lksb) 276int ocfs2_dlm_lvb_valid(struct ocfs2_dlm_lksb *lksb)
272{ 277{
273 return active_stack->sp_ops->lvb_valid(lksb); 278 return active_stack->sp_ops->lvb_valid(lksb);
274} 279}
275EXPORT_SYMBOL_GPL(ocfs2_dlm_lvb_valid); 280EXPORT_SYMBOL_GPL(ocfs2_dlm_lvb_valid);
276 281
277void *ocfs2_dlm_lvb(union ocfs2_dlm_lksb *lksb) 282void *ocfs2_dlm_lvb(struct ocfs2_dlm_lksb *lksb)
278{ 283{
279 return active_stack->sp_ops->lock_lvb(lksb); 284 return active_stack->sp_ops->lock_lvb(lksb);
280} 285}
281EXPORT_SYMBOL_GPL(ocfs2_dlm_lvb); 286EXPORT_SYMBOL_GPL(ocfs2_dlm_lvb);
282 287
283void ocfs2_dlm_dump_lksb(union ocfs2_dlm_lksb *lksb) 288void ocfs2_dlm_dump_lksb(struct ocfs2_dlm_lksb *lksb)
284{ 289{
285 active_stack->sp_ops->dump_lksb(lksb); 290 active_stack->sp_ops->dump_lksb(lksb);
286} 291}