aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2013-09-04 20:23:59 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2013-09-04 20:23:59 -0400
commit6f3bc58d84e9e4c4ed8584e020365f996a26a153 (patch)
tree5358f1b1572b66c19d58e7d8a4510fec43c9e5d5
parentae67d9a888a000a9df43de10eb9950075e93508c (diff)
parentc6ca7bc91d51582ff9e8ab29f675dbc3c40f5742 (diff)
Merge tag 'dlm-3.12' of git://git.kernel.org/pub/scm/linux/kernel/git/teigland/linux-dlm
Pull dlm updates from David Teigland: "This set includes a workqueue cleanup and the removal of incorrect and unneeded signal blocking" * tag 'dlm-3.12' of git://git.kernel.org/pub/scm/linux/kernel/git/teigland/linux-dlm: dlm: remove signal blocking dlm: WQ_NON_REENTRANT is meaningless and going away
-rw-r--r--fs/dlm/ast.c5
-rw-r--r--fs/dlm/user.c24
2 files changed, 7 insertions, 22 deletions
diff --git a/fs/dlm/ast.c b/fs/dlm/ast.c
index 27a6ba9aaeec..0e90f0c91b93 100644
--- a/fs/dlm/ast.c
+++ b/fs/dlm/ast.c
@@ -267,10 +267,7 @@ void dlm_callback_work(struct work_struct *work)
267int dlm_callback_start(struct dlm_ls *ls) 267int dlm_callback_start(struct dlm_ls *ls)
268{ 268{
269 ls->ls_callback_wq = alloc_workqueue("dlm_callback", 269 ls->ls_callback_wq = alloc_workqueue("dlm_callback",
270 WQ_UNBOUND | 270 WQ_UNBOUND | WQ_MEM_RECLAIM, 0);
271 WQ_MEM_RECLAIM |
272 WQ_NON_REENTRANT,
273 0);
274 if (!ls->ls_callback_wq) { 271 if (!ls->ls_callback_wq) {
275 log_print("can't start dlm_callback workqueue"); 272 log_print("can't start dlm_callback workqueue");
276 return -ENOMEM; 273 return -ENOMEM;
diff --git a/fs/dlm/user.c b/fs/dlm/user.c
index 812149119fa3..142e21655eed 100644
--- a/fs/dlm/user.c
+++ b/fs/dlm/user.c
@@ -493,7 +493,6 @@ static ssize_t device_write(struct file *file, const char __user *buf,
493{ 493{
494 struct dlm_user_proc *proc = file->private_data; 494 struct dlm_user_proc *proc = file->private_data;
495 struct dlm_write_request *kbuf; 495 struct dlm_write_request *kbuf;
496 sigset_t tmpsig, allsigs;
497 int error; 496 int error;
498 497
499#ifdef CONFIG_COMPAT 498#ifdef CONFIG_COMPAT
@@ -557,9 +556,6 @@ static ssize_t device_write(struct file *file, const char __user *buf,
557 goto out_free; 556 goto out_free;
558 } 557 }
559 558
560 sigfillset(&allsigs);
561 sigprocmask(SIG_BLOCK, &allsigs, &tmpsig);
562
563 error = -EINVAL; 559 error = -EINVAL;
564 560
565 switch (kbuf->cmd) 561 switch (kbuf->cmd)
@@ -567,7 +563,7 @@ static ssize_t device_write(struct file *file, const char __user *buf,
567 case DLM_USER_LOCK: 563 case DLM_USER_LOCK:
568 if (!proc) { 564 if (!proc) {
569 log_print("no locking on control device"); 565 log_print("no locking on control device");
570 goto out_sig; 566 goto out_free;
571 } 567 }
572 error = device_user_lock(proc, &kbuf->i.lock); 568 error = device_user_lock(proc, &kbuf->i.lock);
573 break; 569 break;
@@ -575,7 +571,7 @@ static ssize_t device_write(struct file *file, const char __user *buf,
575 case DLM_USER_UNLOCK: 571 case DLM_USER_UNLOCK:
576 if (!proc) { 572 if (!proc) {
577 log_print("no locking on control device"); 573 log_print("no locking on control device");
578 goto out_sig; 574 goto out_free;
579 } 575 }
580 error = device_user_unlock(proc, &kbuf->i.lock); 576 error = device_user_unlock(proc, &kbuf->i.lock);
581 break; 577 break;
@@ -583,7 +579,7 @@ static ssize_t device_write(struct file *file, const char __user *buf,
583 case DLM_USER_DEADLOCK: 579 case DLM_USER_DEADLOCK:
584 if (!proc) { 580 if (!proc) {
585 log_print("no locking on control device"); 581 log_print("no locking on control device");
586 goto out_sig; 582 goto out_free;
587 } 583 }
588 error = device_user_deadlock(proc, &kbuf->i.lock); 584 error = device_user_deadlock(proc, &kbuf->i.lock);
589 break; 585 break;
@@ -591,7 +587,7 @@ static ssize_t device_write(struct file *file, const char __user *buf,
591 case DLM_USER_CREATE_LOCKSPACE: 587 case DLM_USER_CREATE_LOCKSPACE:
592 if (proc) { 588 if (proc) {
593 log_print("create/remove only on control device"); 589 log_print("create/remove only on control device");
594 goto out_sig; 590 goto out_free;
595 } 591 }
596 error = device_create_lockspace(&kbuf->i.lspace); 592 error = device_create_lockspace(&kbuf->i.lspace);
597 break; 593 break;
@@ -599,7 +595,7 @@ static ssize_t device_write(struct file *file, const char __user *buf,
599 case DLM_USER_REMOVE_LOCKSPACE: 595 case DLM_USER_REMOVE_LOCKSPACE:
600 if (proc) { 596 if (proc) {
601 log_print("create/remove only on control device"); 597 log_print("create/remove only on control device");
602 goto out_sig; 598 goto out_free;
603 } 599 }
604 error = device_remove_lockspace(&kbuf->i.lspace); 600 error = device_remove_lockspace(&kbuf->i.lspace);
605 break; 601 break;
@@ -607,7 +603,7 @@ static ssize_t device_write(struct file *file, const char __user *buf,
607 case DLM_USER_PURGE: 603 case DLM_USER_PURGE:
608 if (!proc) { 604 if (!proc) {
609 log_print("no locking on control device"); 605 log_print("no locking on control device");
610 goto out_sig; 606 goto out_free;
611 } 607 }
612 error = device_user_purge(proc, &kbuf->i.purge); 608 error = device_user_purge(proc, &kbuf->i.purge);
613 break; 609 break;
@@ -617,8 +613,6 @@ static ssize_t device_write(struct file *file, const char __user *buf,
617 kbuf->cmd); 613 kbuf->cmd);
618 } 614 }
619 615
620 out_sig:
621 sigprocmask(SIG_SETMASK, &tmpsig, NULL);
622 out_free: 616 out_free:
623 kfree(kbuf); 617 kfree(kbuf);
624 return error; 618 return error;
@@ -659,15 +653,11 @@ static int device_close(struct inode *inode, struct file *file)
659{ 653{
660 struct dlm_user_proc *proc = file->private_data; 654 struct dlm_user_proc *proc = file->private_data;
661 struct dlm_ls *ls; 655 struct dlm_ls *ls;
662 sigset_t tmpsig, allsigs;
663 656
664 ls = dlm_find_lockspace_local(proc->lockspace); 657 ls = dlm_find_lockspace_local(proc->lockspace);
665 if (!ls) 658 if (!ls)
666 return -ENOENT; 659 return -ENOENT;
667 660
668 sigfillset(&allsigs);
669 sigprocmask(SIG_BLOCK, &allsigs, &tmpsig);
670
671 set_bit(DLM_PROC_FLAGS_CLOSING, &proc->flags); 661 set_bit(DLM_PROC_FLAGS_CLOSING, &proc->flags);
672 662
673 dlm_clear_proc_locks(ls, proc); 663 dlm_clear_proc_locks(ls, proc);
@@ -685,8 +675,6 @@ static int device_close(struct inode *inode, struct file *file)
685 /* FIXME: AUTOFREE: if this ls is no longer used do 675 /* FIXME: AUTOFREE: if this ls is no longer used do
686 device_remove_lockspace() */ 676 device_remove_lockspace() */
687 677
688 sigprocmask(SIG_SETMASK, &tmpsig, NULL);
689
690 return 0; 678 return 0;
691} 679}
692 680