mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-11 12:28:41 +08:00
dlm for 3.12
This set includes a workqueue cleanup and the removal of incorrect and unneeded signal blocking. -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.13 (GNU/Linux) iQIcBAABAgAGBQJSJ4DKAAoJEDgbc8f8gGmqJ3kP/2UwnKt9degadDAPGy+xORUK WDkQ3YHacNkdVaIdSh6o4pAHG0Z2JU8zykJkHOAJd+SZhEp0hxEu05rfUSZKxJH/ b3pG6dpjX8pC1TtSibFXRrpH2BHIzpPRdxiDkmMs71myExwxeMbIQuGxmft8nigB 6yPBbb8biVTCNTzdpR2b0KbVKzrkIBotwWTUEZd3HJedxRO/BlQxOgHDgnicupfH 0FsU3aa+p986wwajZBPXPFrVcBGHMXOXc3Lpm56Uh7OwqCVYe2gE7BMW3Y7rcZ1G sGiB542m5i/LAYnf8sFXm2OLVjaUjWPyrWIyrLe5pPzZtHxctdhfyOHzXBqvKkj3 VRdcQN1rob+/8FGyu3tmYjhlhkEVQqIEX6sweuuGG5sE/zzvUzcUP0qIAT11QQJ/ Bt7nv5VpfT7kxIf7ToL/NtxHulU66TxC387d/QnkXftlDbzpzEY0YcCmcIdZMVEr e6rgvp1iWTvasLh/UFjTBkoRAX4DGpFQasYcS1S+Uj3IZx/wIbN8sIEijWcVvvuz fLeF2idgNqFCseWceBJGoHPsgFPRVDdFk9+7isu4FQYOEH0+VfNqJz3YU/bTehGK +GcfORSKohw2M3EUarcRHN0dV6vy6C/ACgTiUb7CubgbiUUzNWKTVVVuzRGqzBNE +k7w/Zbbz+Eugm4Zkty8 =MaZw -----END PGP SIGNATURE----- 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
This commit is contained in:
commit
6f3bc58d84
@ -267,10 +267,7 @@ void dlm_callback_work(struct work_struct *work)
|
||||
int dlm_callback_start(struct dlm_ls *ls)
|
||||
{
|
||||
ls->ls_callback_wq = alloc_workqueue("dlm_callback",
|
||||
WQ_UNBOUND |
|
||||
WQ_MEM_RECLAIM |
|
||||
WQ_NON_REENTRANT,
|
||||
0);
|
||||
WQ_UNBOUND | WQ_MEM_RECLAIM, 0);
|
||||
if (!ls->ls_callback_wq) {
|
||||
log_print("can't start dlm_callback workqueue");
|
||||
return -ENOMEM;
|
||||
|
@ -493,7 +493,6 @@ static ssize_t device_write(struct file *file, const char __user *buf,
|
||||
{
|
||||
struct dlm_user_proc *proc = file->private_data;
|
||||
struct dlm_write_request *kbuf;
|
||||
sigset_t tmpsig, allsigs;
|
||||
int error;
|
||||
|
||||
#ifdef CONFIG_COMPAT
|
||||
@ -557,9 +556,6 @@ static ssize_t device_write(struct file *file, const char __user *buf,
|
||||
goto out_free;
|
||||
}
|
||||
|
||||
sigfillset(&allsigs);
|
||||
sigprocmask(SIG_BLOCK, &allsigs, &tmpsig);
|
||||
|
||||
error = -EINVAL;
|
||||
|
||||
switch (kbuf->cmd)
|
||||
@ -567,7 +563,7 @@ static ssize_t device_write(struct file *file, const char __user *buf,
|
||||
case DLM_USER_LOCK:
|
||||
if (!proc) {
|
||||
log_print("no locking on control device");
|
||||
goto out_sig;
|
||||
goto out_free;
|
||||
}
|
||||
error = device_user_lock(proc, &kbuf->i.lock);
|
||||
break;
|
||||
@ -575,7 +571,7 @@ static ssize_t device_write(struct file *file, const char __user *buf,
|
||||
case DLM_USER_UNLOCK:
|
||||
if (!proc) {
|
||||
log_print("no locking on control device");
|
||||
goto out_sig;
|
||||
goto out_free;
|
||||
}
|
||||
error = device_user_unlock(proc, &kbuf->i.lock);
|
||||
break;
|
||||
@ -583,7 +579,7 @@ static ssize_t device_write(struct file *file, const char __user *buf,
|
||||
case DLM_USER_DEADLOCK:
|
||||
if (!proc) {
|
||||
log_print("no locking on control device");
|
||||
goto out_sig;
|
||||
goto out_free;
|
||||
}
|
||||
error = device_user_deadlock(proc, &kbuf->i.lock);
|
||||
break;
|
||||
@ -591,7 +587,7 @@ static ssize_t device_write(struct file *file, const char __user *buf,
|
||||
case DLM_USER_CREATE_LOCKSPACE:
|
||||
if (proc) {
|
||||
log_print("create/remove only on control device");
|
||||
goto out_sig;
|
||||
goto out_free;
|
||||
}
|
||||
error = device_create_lockspace(&kbuf->i.lspace);
|
||||
break;
|
||||
@ -599,7 +595,7 @@ static ssize_t device_write(struct file *file, const char __user *buf,
|
||||
case DLM_USER_REMOVE_LOCKSPACE:
|
||||
if (proc) {
|
||||
log_print("create/remove only on control device");
|
||||
goto out_sig;
|
||||
goto out_free;
|
||||
}
|
||||
error = device_remove_lockspace(&kbuf->i.lspace);
|
||||
break;
|
||||
@ -607,7 +603,7 @@ static ssize_t device_write(struct file *file, const char __user *buf,
|
||||
case DLM_USER_PURGE:
|
||||
if (!proc) {
|
||||
log_print("no locking on control device");
|
||||
goto out_sig;
|
||||
goto out_free;
|
||||
}
|
||||
error = device_user_purge(proc, &kbuf->i.purge);
|
||||
break;
|
||||
@ -617,8 +613,6 @@ static ssize_t device_write(struct file *file, const char __user *buf,
|
||||
kbuf->cmd);
|
||||
}
|
||||
|
||||
out_sig:
|
||||
sigprocmask(SIG_SETMASK, &tmpsig, NULL);
|
||||
out_free:
|
||||
kfree(kbuf);
|
||||
return error;
|
||||
@ -659,15 +653,11 @@ static int device_close(struct inode *inode, struct file *file)
|
||||
{
|
||||
struct dlm_user_proc *proc = file->private_data;
|
||||
struct dlm_ls *ls;
|
||||
sigset_t tmpsig, allsigs;
|
||||
|
||||
ls = dlm_find_lockspace_local(proc->lockspace);
|
||||
if (!ls)
|
||||
return -ENOENT;
|
||||
|
||||
sigfillset(&allsigs);
|
||||
sigprocmask(SIG_BLOCK, &allsigs, &tmpsig);
|
||||
|
||||
set_bit(DLM_PROC_FLAGS_CLOSING, &proc->flags);
|
||||
|
||||
dlm_clear_proc_locks(ls, proc);
|
||||
@ -685,8 +675,6 @@ static int device_close(struct inode *inode, struct file *file)
|
||||
/* FIXME: AUTOFREE: if this ls is no longer used do
|
||||
device_remove_lockspace() */
|
||||
|
||||
sigprocmask(SIG_SETMASK, &tmpsig, NULL);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user