Lines Matching refs:ls

178 	struct dlm_ls *ls;  in dlm_user_add_ast()  local
186 ls = lkb->lkb_resource->res_ls; in dlm_user_add_ast()
187 mutex_lock(&ls->ls_clear_proc_locks); in dlm_user_add_ast()
233 mutex_unlock(&ls->ls_clear_proc_locks); in dlm_user_add_ast()
239 struct dlm_ls *ls; in device_user_lock() local
244 ls = dlm_find_lockspace_local(proc->lockspace); in device_user_lock()
245 if (!ls) in device_user_lock()
265 error = dlm_user_convert(ls, ua, in device_user_lock()
270 error = dlm_user_adopt_orphan(ls, ua, in device_user_lock()
278 error = dlm_user_request(ls, ua, in device_user_lock()
286 dlm_put_lockspace(ls); in device_user_lock()
293 struct dlm_ls *ls; in device_user_unlock() local
297 ls = dlm_find_lockspace_local(proc->lockspace); in device_user_unlock()
298 if (!ls) in device_user_unlock()
310 error = dlm_user_cancel(ls, ua, params->flags, params->lkid); in device_user_unlock()
312 error = dlm_user_unlock(ls, ua, params->flags, params->lkid, in device_user_unlock()
315 dlm_put_lockspace(ls); in device_user_unlock()
322 struct dlm_ls *ls; in device_user_deadlock() local
325 ls = dlm_find_lockspace_local(proc->lockspace); in device_user_deadlock()
326 if (!ls) in device_user_deadlock()
329 error = dlm_user_deadlock(ls, params->flags, params->lkid); in device_user_deadlock()
331 dlm_put_lockspace(ls); in device_user_deadlock()
335 static int dlm_device_register(struct dlm_ls *ls, char *name) in dlm_device_register() argument
341 if (ls->ls_device.name) in dlm_device_register()
346 ls->ls_device.name = kzalloc(len, GFP_NOFS); in dlm_device_register()
347 if (!ls->ls_device.name) in dlm_device_register()
350 snprintf((char *)ls->ls_device.name, len, "%s_%s", name_prefix, in dlm_device_register()
352 ls->ls_device.fops = &device_fops; in dlm_device_register()
353 ls->ls_device.minor = MISC_DYNAMIC_MINOR; in dlm_device_register()
355 error = misc_register(&ls->ls_device); in dlm_device_register()
357 kfree(ls->ls_device.name); in dlm_device_register()
361 ls->ls_device.name = NULL; in dlm_device_register()
367 int dlm_device_deregister(struct dlm_ls *ls) in dlm_device_deregister() argument
372 if (!ls->ls_device.name) in dlm_device_deregister()
375 misc_deregister(&ls->ls_device); in dlm_device_deregister()
376 kfree(ls->ls_device.name); in dlm_device_deregister()
383 struct dlm_ls *ls; in device_user_purge() local
386 ls = dlm_find_lockspace_local(proc->lockspace); in device_user_purge()
387 if (!ls) in device_user_purge()
390 error = dlm_user_purge(ls, proc, params->nodeid, params->pid); in device_user_purge()
392 dlm_put_lockspace(ls); in device_user_purge()
399 struct dlm_ls *ls; in device_create_lockspace() local
411 ls = dlm_find_lockspace_local(lockspace); in device_create_lockspace()
412 if (!ls) in device_create_lockspace()
415 error = dlm_device_register(ls, params->name); in device_create_lockspace()
416 dlm_put_lockspace(ls); in device_create_lockspace()
421 error = ls->ls_device.minor; in device_create_lockspace()
429 struct dlm_ls *ls; in device_remove_lockspace() local
435 ls = dlm_find_lockspace_device(params->minor); in device_remove_lockspace()
436 if (!ls) in device_remove_lockspace()
442 lockspace = ls->ls_local_handle; in device_remove_lockspace()
443 dlm_put_lockspace(ls); in device_remove_lockspace()
633 struct dlm_ls *ls; in device_open() local
635 ls = dlm_find_lockspace_device(iminor(inode)); in device_open()
636 if (!ls) in device_open()
641 dlm_put_lockspace(ls); in device_open()
645 proc->lockspace = ls->ls_local_handle; in device_open()
660 struct dlm_ls *ls; in device_close() local
662 ls = dlm_find_lockspace_local(proc->lockspace); in device_close()
663 if (!ls) in device_close()
668 dlm_clear_proc_locks(ls, proc); in device_close()
677 dlm_put_lockspace(ls); in device_close()
678 dlm_put_lockspace(ls); /* for the find in device_open() */ in device_close()