aboutsummaryrefslogtreecommitdiffstats
path: root/fs/ocfs2/stack_o2cb.c
diff options
context:
space:
mode:
authorJoel Becker <joel.becker@oracle.com>2010-01-29 17:46:44 -0500
committerJoel Becker <joel.becker@oracle.com>2010-02-26 18:41:14 -0500
commitc0e4133851ed94c73ee3d34a2f2a245fcd0a60a1 (patch)
treefd2dd796c4f07d669f00196670bbba5e5a931614 /fs/ocfs2/stack_o2cb.c
parenta796d2862aed8117acc9f470f3429a5ee852912e (diff)
ocfs2: Attach the connection to the lksb
We're going to want it in the ast functions, so we convert union ocfs2_dlm_lksb to struct ocfs2_dlm_lksb and let it carry the connection. Signed-off-by: Joel Becker <joel.becker@oracle.com>
Diffstat (limited to 'fs/ocfs2/stack_o2cb.c')
-rw-r--r--fs/ocfs2/stack_o2cb.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/fs/ocfs2/stack_o2cb.c b/fs/ocfs2/stack_o2cb.c
index c4cedff365df..fa9dd79c3615 100644
--- a/fs/ocfs2/stack_o2cb.c
+++ b/fs/ocfs2/stack_o2cb.c
@@ -161,7 +161,7 @@ static int dlm_status_to_errno(enum dlm_status status)
161 161
162static void o2dlm_lock_ast_wrapper(void *astarg) 162static void o2dlm_lock_ast_wrapper(void *astarg)
163{ 163{
164 union ocfs2_dlm_lksb *lksb = astarg; 164 struct ocfs2_dlm_lksb *lksb = astarg;
165 165
166 BUG_ON(o2cb_stack.sp_proto == NULL); 166 BUG_ON(o2cb_stack.sp_proto == NULL);
167 167
@@ -170,7 +170,7 @@ static void o2dlm_lock_ast_wrapper(void *astarg)
170 170
171static void o2dlm_blocking_ast_wrapper(void *astarg, int level) 171static void o2dlm_blocking_ast_wrapper(void *astarg, int level)
172{ 172{
173 union ocfs2_dlm_lksb *lksb = astarg; 173 struct ocfs2_dlm_lksb *lksb = astarg;
174 174
175 BUG_ON(o2cb_stack.sp_proto == NULL); 175 BUG_ON(o2cb_stack.sp_proto == NULL);
176 176
@@ -179,7 +179,7 @@ static void o2dlm_blocking_ast_wrapper(void *astarg, int level)
179 179
180static void o2dlm_unlock_ast_wrapper(void *astarg, enum dlm_status status) 180static void o2dlm_unlock_ast_wrapper(void *astarg, enum dlm_status status)
181{ 181{
182 union ocfs2_dlm_lksb *lksb = astarg; 182 struct ocfs2_dlm_lksb *lksb = astarg;
183 183
184 int error = dlm_status_to_errno(status); 184 int error = dlm_status_to_errno(status);
185 185
@@ -204,7 +204,7 @@ static void o2dlm_unlock_ast_wrapper(void *astarg, enum dlm_status status)
204 204
205static int o2cb_dlm_lock(struct ocfs2_cluster_connection *conn, 205static int o2cb_dlm_lock(struct ocfs2_cluster_connection *conn,
206 int mode, 206 int mode,
207 union ocfs2_dlm_lksb *lksb, 207 struct ocfs2_dlm_lksb *lksb,
208 u32 flags, 208 u32 flags,
209 void *name, 209 void *name,
210 unsigned int namelen) 210 unsigned int namelen)
@@ -223,7 +223,7 @@ static int o2cb_dlm_lock(struct ocfs2_cluster_connection *conn,
223} 223}
224 224
225static int o2cb_dlm_unlock(struct ocfs2_cluster_connection *conn, 225static int o2cb_dlm_unlock(struct ocfs2_cluster_connection *conn,
226 union ocfs2_dlm_lksb *lksb, 226 struct ocfs2_dlm_lksb *lksb,
227 u32 flags) 227 u32 flags)
228{ 228{
229 enum dlm_status status; 229 enum dlm_status status;
@@ -236,7 +236,7 @@ static int o2cb_dlm_unlock(struct ocfs2_cluster_connection *conn,
236 return ret; 236 return ret;
237} 237}
238 238
239static int o2cb_dlm_lock_status(union ocfs2_dlm_lksb *lksb) 239static int o2cb_dlm_lock_status(struct ocfs2_dlm_lksb *lksb)
240{ 240{
241 return dlm_status_to_errno(lksb->lksb_o2dlm.status); 241 return dlm_status_to_errno(lksb->lksb_o2dlm.status);
242} 242}
@@ -246,17 +246,17 @@ static int o2cb_dlm_lock_status(union ocfs2_dlm_lksb *lksb)
246 * contents, it will zero out the LVB. Thus the caller can always trust 246 * contents, it will zero out the LVB. Thus the caller can always trust
247 * the contents. 247 * the contents.
248 */ 248 */
249static int o2cb_dlm_lvb_valid(union ocfs2_dlm_lksb *lksb) 249static int o2cb_dlm_lvb_valid(struct ocfs2_dlm_lksb *lksb)
250{ 250{
251 return 1; 251 return 1;
252} 252}
253 253
254static void *o2cb_dlm_lvb(union ocfs2_dlm_lksb *lksb) 254static void *o2cb_dlm_lvb(struct ocfs2_dlm_lksb *lksb)
255{ 255{
256 return (void *)(lksb->lksb_o2dlm.lvb); 256 return (void *)(lksb->lksb_o2dlm.lvb);
257} 257}
258 258
259static void o2cb_dump_lksb(union ocfs2_dlm_lksb *lksb) 259static void o2cb_dump_lksb(struct ocfs2_dlm_lksb *lksb)
260{ 260{
261 dlm_print_one_lock(lksb->lksb_o2dlm.lockid); 261 dlm_print_one_lock(lksb->lksb_o2dlm.lockid);
262} 262}