diff options
Diffstat (limited to 'fs/ocfs2/stackglue.c')
-rw-r--r-- | fs/ocfs2/stackglue.c | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/fs/ocfs2/stackglue.c b/fs/ocfs2/stackglue.c index bf45d9bff8a7..119f60cea9cc 100644 --- a/fs/ocfs2/stackglue.c +++ b/fs/ocfs2/stackglue.c | |||
@@ -228,13 +228,20 @@ void ocfs2_stack_glue_set_locking_protocol(struct ocfs2_locking_protocol *proto) | |||
228 | EXPORT_SYMBOL_GPL(ocfs2_stack_glue_set_locking_protocol); | 228 | EXPORT_SYMBOL_GPL(ocfs2_stack_glue_set_locking_protocol); |
229 | 229 | ||
230 | 230 | ||
231 | /* | ||
232 | * The ocfs2_dlm_lock() and ocfs2_dlm_unlock() functions take | ||
233 | * "struct ocfs2_lock_res *astarg" instead of "void *astarg" because the | ||
234 | * underlying stack plugins need to pilfer the lksb off of the lock_res. | ||
235 | * If some other structure needs to be passed as an astarg, the plugins | ||
236 | * will need to be given a different avenue to the lksb. | ||
237 | */ | ||
231 | int ocfs2_dlm_lock(struct ocfs2_cluster_connection *conn, | 238 | int ocfs2_dlm_lock(struct ocfs2_cluster_connection *conn, |
232 | int mode, | 239 | int mode, |
233 | union ocfs2_dlm_lksb *lksb, | 240 | union ocfs2_dlm_lksb *lksb, |
234 | u32 flags, | 241 | u32 flags, |
235 | void *name, | 242 | void *name, |
236 | unsigned int namelen, | 243 | unsigned int namelen, |
237 | void *astarg) | 244 | struct ocfs2_lock_res *astarg) |
238 | { | 245 | { |
239 | BUG_ON(lproto == NULL); | 246 | BUG_ON(lproto == NULL); |
240 | 247 | ||
@@ -246,7 +253,7 @@ EXPORT_SYMBOL_GPL(ocfs2_dlm_lock); | |||
246 | int ocfs2_dlm_unlock(struct ocfs2_cluster_connection *conn, | 253 | int ocfs2_dlm_unlock(struct ocfs2_cluster_connection *conn, |
247 | union ocfs2_dlm_lksb *lksb, | 254 | union ocfs2_dlm_lksb *lksb, |
248 | u32 flags, | 255 | u32 flags, |
249 | void *astarg) | 256 | struct ocfs2_lock_res *astarg) |
250 | { | 257 | { |
251 | BUG_ON(lproto == NULL); | 258 | BUG_ON(lproto == NULL); |
252 | 259 | ||
@@ -360,7 +367,8 @@ void ocfs2_cluster_hangup(const char *group, int grouplen) | |||
360 | BUG_ON(group == NULL); | 367 | BUG_ON(group == NULL); |
361 | BUG_ON(group[grouplen] != '\0'); | 368 | BUG_ON(group[grouplen] != '\0'); |
362 | 369 | ||
363 | active_stack->sp_ops->hangup(group, grouplen); | 370 | if (active_stack->sp_ops->hangup) |
371 | active_stack->sp_ops->hangup(group, grouplen); | ||
364 | 372 | ||
365 | /* cluster_disconnect() was called with hangup_pending==1 */ | 373 | /* cluster_disconnect() was called with hangup_pending==1 */ |
366 | ocfs2_stack_driver_put(); | 374 | ocfs2_stack_driver_put(); |