diff options
Diffstat (limited to 'fs/ocfs2/stackglue.c')
-rw-r--r-- | fs/ocfs2/stackglue.c | 17 |
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 | */ |
241 | int ocfs2_dlm_lock(struct ocfs2_cluster_connection *conn, | 241 | int 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 | } |
253 | EXPORT_SYMBOL_GPL(ocfs2_dlm_lock); | 257 | EXPORT_SYMBOL_GPL(ocfs2_dlm_lock); |
254 | 258 | ||
255 | int ocfs2_dlm_unlock(struct ocfs2_cluster_connection *conn, | 259 | int 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 | } |
263 | EXPORT_SYMBOL_GPL(ocfs2_dlm_unlock); | 268 | EXPORT_SYMBOL_GPL(ocfs2_dlm_unlock); |
264 | 269 | ||
265 | int ocfs2_dlm_lock_status(union ocfs2_dlm_lksb *lksb) | 270 | int 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 | } |
269 | EXPORT_SYMBOL_GPL(ocfs2_dlm_lock_status); | 274 | EXPORT_SYMBOL_GPL(ocfs2_dlm_lock_status); |
270 | 275 | ||
271 | int ocfs2_dlm_lvb_valid(union ocfs2_dlm_lksb *lksb) | 276 | int 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 | } |
275 | EXPORT_SYMBOL_GPL(ocfs2_dlm_lvb_valid); | 280 | EXPORT_SYMBOL_GPL(ocfs2_dlm_lvb_valid); |
276 | 281 | ||
277 | void *ocfs2_dlm_lvb(union ocfs2_dlm_lksb *lksb) | 282 | void *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 | } |
281 | EXPORT_SYMBOL_GPL(ocfs2_dlm_lvb); | 286 | EXPORT_SYMBOL_GPL(ocfs2_dlm_lvb); |
282 | 287 | ||
283 | void ocfs2_dlm_dump_lksb(union ocfs2_dlm_lksb *lksb) | 288 | void 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 | } |