1 /* -*- mode: c; c-basic-offset: 8; -*-
2 * vim: noexpandtab sw=8 ts=8 sts=0:
6 * Code which implements an OCFS2 specific interface to underlying
9 * Copyright (C) 2007 Oracle. All rights reserved.
11 * This program is free software; you can redistribute it and/or
12 * modify it under the terms of the GNU General Public
13 * License as published by the Free Software Foundation, version 2.
15 * This program is distributed in the hope that it will be useful,
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
18 * General Public License for more details.
21 #include <linux/types.h>
22 #include <linux/list.h>
24 #include "dlm/dlmapi.h"
26 #include "stackglue.h"
28 static struct ocfs2_locking_protocol *lproto;
30 enum dlm_status ocfs2_dlm_lock(struct dlm_ctxt *dlm,
32 struct dlm_lockstatus *lksb,
38 BUG_ON(lproto == NULL);
39 return dlmlock(dlm, mode, lksb, flags, name, namelen,
40 lproto->lp_lock_ast, astarg,
41 lproto->lp_blocking_ast);
44 enum dlm_status ocfs2_dlm_unlock(struct dlm_ctxt *dlm,
45 struct dlm_lockstatus *lksb,
49 BUG_ON(lproto == NULL);
51 return dlmunlock(dlm, lksb, flags, lproto->lp_unlock_ast, astarg);
55 void o2cb_get_stack(struct ocfs2_locking_protocol *proto)
57 BUG_ON(proto == NULL);
62 void o2cb_put_stack(void)