#include <linux/miscdevice.h>
#include <linux/lock_dlm_plock.h>
+#include <linux/poll.h>
#include "lock_dlm.h"
wake_up(&send_wq);
}
-int gdlm_plock(lm_lockspace_t *lockspace, struct lm_lockname *name,
+int gdlm_plock(void *lockspace, struct lm_lockname *name,
struct file *file, int cmd, struct file_lock *fl)
{
- struct gdlm_ls *ls = (struct gdlm_ls *) lockspace;
+ struct gdlm_ls *ls = lockspace;
struct plock_op *op;
int rv;
return rv;
}
-int gdlm_punlock(lm_lockspace_t *lockspace, struct lm_lockname *name,
+int gdlm_punlock(void *lockspace, struct lm_lockname *name,
struct file *file, struct file_lock *fl)
{
- struct gdlm_ls *ls = (struct gdlm_ls *) lockspace;
+ struct gdlm_ls *ls = lockspace;
struct plock_op *op;
int rv;
return rv;
}
-int gdlm_plock_get(lm_lockspace_t *lockspace, struct lm_lockname *name,
+int gdlm_plock_get(void *lockspace, struct lm_lockname *name,
struct file *file, struct file_lock *fl)
{
- struct gdlm_ls *ls = (struct gdlm_ls *) lockspace;
+ struct gdlm_ls *ls = lockspace;
struct plock_op *op;
int rv;
spin_lock(&ops_lock);
list_for_each_entry(op, &recv_list, list) {
- if (op->info.fsid == info.fsid &&
- op->info.number == info.number &&
+ if (op->info.fsid == info.fsid && op->info.number == info.number &&
op->info.owner == info.owner) {
list_del_init(&op->list);
found = 1;
return 0;
}
-static struct file_operations dev_fops = {
+static const struct file_operations dev_fops = {
.read = dev_read,
.write = dev_write,
.poll = dev_poll,