Lines Matching refs:proc
181 struct dlm_user_proc *proc;
201 proc = ua->proc;
206 spin_lock(&proc->asts_spin);
217 list_add_tail(&lkb->lkb_astqueue, &proc->asts);
219 wake_up_interruptible(&proc->wait);
243 spin_unlock(&proc->asts_spin);
246 spin_lock(&proc->locks_spin);
251 spin_unlock(&proc->locks_spin);
257 static int device_user_lock(struct dlm_user_proc *proc,
264 ls = dlm_find_lockspace_local(proc->lockspace);
276 ua->proc = proc;
302 static int device_user_unlock(struct dlm_user_proc *proc,
309 ls = dlm_find_lockspace_local(proc->lockspace);
316 ua->proc = proc;
331 static int device_user_deadlock(struct dlm_user_proc *proc,
337 ls = dlm_find_lockspace_local(proc->lockspace);
391 static int device_user_purge(struct dlm_user_proc *proc,
397 ls = dlm_find_lockspace_local(proc->lockspace);
401 error = dlm_user_purge(ls, proc, params->nodeid, params->pid);
514 struct dlm_user_proc *proc = file->private_data;
558 if (proc)
559 set_bit(DLM_PROC_FLAGS_COMPAT, &proc->flags);
568 (proc && test_bit(DLM_PROC_FLAGS_CLOSING, &proc->flags))) {
581 if (!proc) {
585 error = device_user_lock(proc, &kbuf->i.lock);
589 if (!proc) {
593 error = device_user_unlock(proc, &kbuf->i.lock);
597 if (!proc) {
601 error = device_user_deadlock(proc, &kbuf->i.lock);
605 if (proc) {
613 if (proc) {
621 if (!proc) {
625 error = device_user_purge(proc, &kbuf->i.purge);
641 /* Every process that opens the lockspace device has its own "proc" structure
647 struct dlm_user_proc *proc;
654 proc = kzalloc(sizeof(struct dlm_user_proc), GFP_NOFS);
655 if (!proc) {
660 proc->lockspace = ls->ls_local_handle;
661 INIT_LIST_HEAD(&proc->asts);
662 INIT_LIST_HEAD(&proc->locks);
663 INIT_LIST_HEAD(&proc->unlocking);
664 spin_lock_init(&proc->asts_spin);
665 spin_lock_init(&proc->locks_spin);
666 init_waitqueue_head(&proc->wait);
667 file->private_data = proc;
674 struct dlm_user_proc *proc = file->private_data;
678 ls = dlm_find_lockspace_local(proc->lockspace);
685 set_bit(DLM_PROC_FLAGS_CLOSING, &proc->flags);
687 dlm_clear_proc_locks(ls, proc);
691 looking for lkb->ua->proc */
693 kfree(proc);
794 struct dlm_user_proc *proc = file->private_data;
806 if (!proc) {
821 if (test_bit(DLM_PROC_FLAGS_CLOSING, &proc->flags))
824 spin_lock(&proc->asts_spin);
825 if (list_empty(&proc->asts)) {
827 spin_unlock(&proc->asts_spin);
831 add_wait_queue(&proc->wait, &wait);
835 if (list_empty(&proc->asts) && !signal_pending(current)) {
836 spin_unlock(&proc->asts_spin);
838 spin_lock(&proc->asts_spin);
842 remove_wait_queue(&proc->wait, &wait);
845 spin_unlock(&proc->asts_spin);
853 lkb = list_entry(proc->asts.next, struct dlm_lkb, lkb_astqueue);
910 spin_unlock(&proc->asts_spin);
914 test_bit(DLM_PROC_FLAGS_COMPAT, &proc->flags),
923 /* removes reference for the proc->asts lists added by
940 struct dlm_user_proc *proc = file->private_data;
942 poll_wait(file, &proc->wait, wait);
944 spin_lock(&proc->asts_spin);
945 if (!list_empty(&proc->asts)) {
946 spin_unlock(&proc->asts_spin);
949 spin_unlock(&proc->asts_spin);