diff options
Diffstat (limited to 'dlm/dlm_klock/dlm_klock.c')
-rw-r--r-- | dlm/dlm_klock/dlm_klock.c | 21 |
1 files changed, 5 insertions, 16 deletions
diff --git a/dlm/dlm_klock/dlm_klock.c b/dlm/dlm_klock/dlm_klock.c index a7b533f..da819f9 100644 --- a/dlm/dlm_klock/dlm_klock.c +++ b/dlm/dlm_klock/dlm_klock.c @@ -12,11 +12,14 @@ #include <linux/delay.h> #include <linux/proc_fs.h> #include <linux/jiffies.h> +#include <linux/errno.h> +#include <linux/ctype.h> +#include <linux/kernel.h> +#include <linux/sched.h> #include <linux/dlm.h> static struct proc_dir_entry *proc_dir = NULL; -static char ls_name[32]; static dlm_lockspace_t *ls; static struct dlm_lksb lksb; static wait_queue_head_t wq; @@ -212,25 +215,11 @@ static int unlock_write(struct file *file, const char *buffer, static int join_write(struct file *file, const char *buffer, unsigned long count, void *data) { - int rv, i; + int rv; if (ls) return -EBUSY; - /* - if (copy_from_user(ls_name, buffer, count)) - return -EFAULT; - - memset(ls_name, 0, sizeof(ls_name)); - - for (i = 0; i < strlen(ls_name); i++) { - if (ls_name[i] == '\n') { - ls_name[i] = '\0'; - break; - } - } - */ - #ifdef RHEL4 rv = dlm_new_lockspace("klock", 5, &ls, DLM_LSF_NOTIMERS); #else |