Loading fs/dlm/user.c +6 −19 Original line number Original line Diff line number Diff line Loading @@ -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_user_proc *proc = file->private_data; struct dlm_write_request *kbuf; struct dlm_write_request *kbuf; sigset_t tmpsig, allsigs; int error; int error; #ifdef CONFIG_COMPAT #ifdef CONFIG_COMPAT Loading Loading @@ -557,9 +556,6 @@ static ssize_t device_write(struct file *file, const char __user *buf, goto out_free; goto out_free; } } sigfillset(&allsigs); sigprocmask(SIG_BLOCK, &allsigs, &tmpsig); error = -EINVAL; error = -EINVAL; switch (kbuf->cmd) switch (kbuf->cmd) Loading @@ -567,7 +563,7 @@ static ssize_t device_write(struct file *file, const char __user *buf, case DLM_USER_LOCK: case DLM_USER_LOCK: if (!proc) { if (!proc) { log_print("no locking on control device"); log_print("no locking on control device"); goto out_sig; goto out_free; } } error = device_user_lock(proc, &kbuf->i.lock); error = device_user_lock(proc, &kbuf->i.lock); break; break; Loading @@ -575,7 +571,7 @@ static ssize_t device_write(struct file *file, const char __user *buf, case DLM_USER_UNLOCK: case DLM_USER_UNLOCK: if (!proc) { if (!proc) { log_print("no locking on control device"); log_print("no locking on control device"); goto out_sig; goto out_free; } } error = device_user_unlock(proc, &kbuf->i.lock); error = device_user_unlock(proc, &kbuf->i.lock); break; break; Loading @@ -583,7 +579,7 @@ static ssize_t device_write(struct file *file, const char __user *buf, case DLM_USER_DEADLOCK: case DLM_USER_DEADLOCK: if (!proc) { if (!proc) { log_print("no locking on control device"); log_print("no locking on control device"); goto out_sig; goto out_free; } } error = device_user_deadlock(proc, &kbuf->i.lock); error = device_user_deadlock(proc, &kbuf->i.lock); break; break; Loading @@ -591,7 +587,7 @@ static ssize_t device_write(struct file *file, const char __user *buf, case DLM_USER_CREATE_LOCKSPACE: case DLM_USER_CREATE_LOCKSPACE: if (proc) { if (proc) { log_print("create/remove only on control device"); log_print("create/remove only on control device"); goto out_sig; goto out_free; } } error = device_create_lockspace(&kbuf->i.lspace); error = device_create_lockspace(&kbuf->i.lspace); break; break; Loading @@ -599,7 +595,7 @@ static ssize_t device_write(struct file *file, const char __user *buf, case DLM_USER_REMOVE_LOCKSPACE: case DLM_USER_REMOVE_LOCKSPACE: if (proc) { if (proc) { log_print("create/remove only on control device"); log_print("create/remove only on control device"); goto out_sig; goto out_free; } } error = device_remove_lockspace(&kbuf->i.lspace); error = device_remove_lockspace(&kbuf->i.lspace); break; break; Loading @@ -607,7 +603,7 @@ static ssize_t device_write(struct file *file, const char __user *buf, case DLM_USER_PURGE: case DLM_USER_PURGE: if (!proc) { if (!proc) { log_print("no locking on control device"); log_print("no locking on control device"); goto out_sig; goto out_free; } } error = device_user_purge(proc, &kbuf->i.purge); error = device_user_purge(proc, &kbuf->i.purge); break; break; Loading @@ -617,8 +613,6 @@ static ssize_t device_write(struct file *file, const char __user *buf, kbuf->cmd); kbuf->cmd); } } out_sig: sigprocmask(SIG_SETMASK, &tmpsig, NULL); out_free: out_free: kfree(kbuf); kfree(kbuf); return error; return error; Loading Loading @@ -659,15 +653,11 @@ static int device_close(struct inode *inode, struct file *file) { { struct dlm_user_proc *proc = file->private_data; struct dlm_user_proc *proc = file->private_data; struct dlm_ls *ls; struct dlm_ls *ls; sigset_t tmpsig, allsigs; ls = dlm_find_lockspace_local(proc->lockspace); ls = dlm_find_lockspace_local(proc->lockspace); if (!ls) if (!ls) return -ENOENT; return -ENOENT; sigfillset(&allsigs); sigprocmask(SIG_BLOCK, &allsigs, &tmpsig); set_bit(DLM_PROC_FLAGS_CLOSING, &proc->flags); set_bit(DLM_PROC_FLAGS_CLOSING, &proc->flags); dlm_clear_proc_locks(ls, proc); dlm_clear_proc_locks(ls, proc); Loading @@ -685,9 +675,6 @@ static int device_close(struct inode *inode, struct file *file) /* FIXME: AUTOFREE: if this ls is no longer used do /* FIXME: AUTOFREE: if this ls is no longer used do device_remove_lockspace() */ device_remove_lockspace() */ sigprocmask(SIG_SETMASK, &tmpsig, NULL); recalc_sigpending(); return 0; return 0; } } Loading Loading
fs/dlm/user.c +6 −19 Original line number Original line Diff line number Diff line Loading @@ -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_user_proc *proc = file->private_data; struct dlm_write_request *kbuf; struct dlm_write_request *kbuf; sigset_t tmpsig, allsigs; int error; int error; #ifdef CONFIG_COMPAT #ifdef CONFIG_COMPAT Loading Loading @@ -557,9 +556,6 @@ static ssize_t device_write(struct file *file, const char __user *buf, goto out_free; goto out_free; } } sigfillset(&allsigs); sigprocmask(SIG_BLOCK, &allsigs, &tmpsig); error = -EINVAL; error = -EINVAL; switch (kbuf->cmd) switch (kbuf->cmd) Loading @@ -567,7 +563,7 @@ static ssize_t device_write(struct file *file, const char __user *buf, case DLM_USER_LOCK: case DLM_USER_LOCK: if (!proc) { if (!proc) { log_print("no locking on control device"); log_print("no locking on control device"); goto out_sig; goto out_free; } } error = device_user_lock(proc, &kbuf->i.lock); error = device_user_lock(proc, &kbuf->i.lock); break; break; Loading @@ -575,7 +571,7 @@ static ssize_t device_write(struct file *file, const char __user *buf, case DLM_USER_UNLOCK: case DLM_USER_UNLOCK: if (!proc) { if (!proc) { log_print("no locking on control device"); log_print("no locking on control device"); goto out_sig; goto out_free; } } error = device_user_unlock(proc, &kbuf->i.lock); error = device_user_unlock(proc, &kbuf->i.lock); break; break; Loading @@ -583,7 +579,7 @@ static ssize_t device_write(struct file *file, const char __user *buf, case DLM_USER_DEADLOCK: case DLM_USER_DEADLOCK: if (!proc) { if (!proc) { log_print("no locking on control device"); log_print("no locking on control device"); goto out_sig; goto out_free; } } error = device_user_deadlock(proc, &kbuf->i.lock); error = device_user_deadlock(proc, &kbuf->i.lock); break; break; Loading @@ -591,7 +587,7 @@ static ssize_t device_write(struct file *file, const char __user *buf, case DLM_USER_CREATE_LOCKSPACE: case DLM_USER_CREATE_LOCKSPACE: if (proc) { if (proc) { log_print("create/remove only on control device"); log_print("create/remove only on control device"); goto out_sig; goto out_free; } } error = device_create_lockspace(&kbuf->i.lspace); error = device_create_lockspace(&kbuf->i.lspace); break; break; Loading @@ -599,7 +595,7 @@ static ssize_t device_write(struct file *file, const char __user *buf, case DLM_USER_REMOVE_LOCKSPACE: case DLM_USER_REMOVE_LOCKSPACE: if (proc) { if (proc) { log_print("create/remove only on control device"); log_print("create/remove only on control device"); goto out_sig; goto out_free; } } error = device_remove_lockspace(&kbuf->i.lspace); error = device_remove_lockspace(&kbuf->i.lspace); break; break; Loading @@ -607,7 +603,7 @@ static ssize_t device_write(struct file *file, const char __user *buf, case DLM_USER_PURGE: case DLM_USER_PURGE: if (!proc) { if (!proc) { log_print("no locking on control device"); log_print("no locking on control device"); goto out_sig; goto out_free; } } error = device_user_purge(proc, &kbuf->i.purge); error = device_user_purge(proc, &kbuf->i.purge); break; break; Loading @@ -617,8 +613,6 @@ static ssize_t device_write(struct file *file, const char __user *buf, kbuf->cmd); kbuf->cmd); } } out_sig: sigprocmask(SIG_SETMASK, &tmpsig, NULL); out_free: out_free: kfree(kbuf); kfree(kbuf); return error; return error; Loading Loading @@ -659,15 +653,11 @@ static int device_close(struct inode *inode, struct file *file) { { struct dlm_user_proc *proc = file->private_data; struct dlm_user_proc *proc = file->private_data; struct dlm_ls *ls; struct dlm_ls *ls; sigset_t tmpsig, allsigs; ls = dlm_find_lockspace_local(proc->lockspace); ls = dlm_find_lockspace_local(proc->lockspace); if (!ls) if (!ls) return -ENOENT; return -ENOENT; sigfillset(&allsigs); sigprocmask(SIG_BLOCK, &allsigs, &tmpsig); set_bit(DLM_PROC_FLAGS_CLOSING, &proc->flags); set_bit(DLM_PROC_FLAGS_CLOSING, &proc->flags); dlm_clear_proc_locks(ls, proc); dlm_clear_proc_locks(ls, proc); Loading @@ -685,9 +675,6 @@ static int device_close(struct inode *inode, struct file *file) /* FIXME: AUTOFREE: if this ls is no longer used do /* FIXME: AUTOFREE: if this ls is no longer used do device_remove_lockspace() */ device_remove_lockspace() */ sigprocmask(SIG_SETMASK, &tmpsig, NULL); recalc_sigpending(); return 0; return 0; } } Loading