diff options
Diffstat (limited to 'fs/ocfs2/dlm')
-rw-r--r-- | fs/ocfs2/dlm/dlmcommon.h | 2 | ||||
-rw-r--r-- | fs/ocfs2/dlm/dlmdomain.c | 5 | ||||
-rw-r--r-- | fs/ocfs2/dlm/dlmfs.c | 10 | ||||
-rw-r--r-- | fs/ocfs2/dlm/dlmmaster.c | 2 | ||||
-rw-r--r-- | fs/ocfs2/dlm/dlmrecovery.c | 5 | ||||
-rw-r--r-- | fs/ocfs2/dlm/userdlm.c | 10 |
6 files changed, 18 insertions, 16 deletions
diff --git a/fs/ocfs2/dlm/dlmcommon.h b/fs/ocfs2/dlm/dlmcommon.h index fa968180b072..6b6ff76538c5 100644 --- a/fs/ocfs2/dlm/dlmcommon.h +++ b/fs/ocfs2/dlm/dlmcommon.h | |||
@@ -153,7 +153,7 @@ static inline struct hlist_head *dlm_lockres_hash(struct dlm_ctxt *dlm, unsigned | |||
153 | * called functions that cannot be directly called from the | 153 | * called functions that cannot be directly called from the |
154 | * net message handlers for some reason, usually because | 154 | * net message handlers for some reason, usually because |
155 | * they need to send net messages of their own. */ | 155 | * they need to send net messages of their own. */ |
156 | void dlm_dispatch_work(void *data); | 156 | void dlm_dispatch_work(struct work_struct *work); |
157 | 157 | ||
158 | struct dlm_lock_resource; | 158 | struct dlm_lock_resource; |
159 | struct dlm_work_item; | 159 | struct dlm_work_item; |
diff --git a/fs/ocfs2/dlm/dlmdomain.c b/fs/ocfs2/dlm/dlmdomain.c index 8d1065f8b3bd..420a375a3949 100644 --- a/fs/ocfs2/dlm/dlmdomain.c +++ b/fs/ocfs2/dlm/dlmdomain.c | |||
@@ -68,7 +68,8 @@ static void **dlm_alloc_pagevec(int pages) | |||
68 | goto out_free; | 68 | goto out_free; |
69 | 69 | ||
70 | mlog(0, "Allocated DLM hash pagevec; %d pages (%lu expected), %lu buckets per page\n", | 70 | mlog(0, "Allocated DLM hash pagevec; %d pages (%lu expected), %lu buckets per page\n", |
71 | pages, DLM_HASH_PAGES, (unsigned long)DLM_BUCKETS_PER_PAGE); | 71 | pages, (unsigned long)DLM_HASH_PAGES, |
72 | (unsigned long)DLM_BUCKETS_PER_PAGE); | ||
72 | return vec; | 73 | return vec; |
73 | out_free: | 74 | out_free: |
74 | dlm_free_pagevec(vec, i); | 75 | dlm_free_pagevec(vec, i); |
@@ -1296,7 +1297,7 @@ static struct dlm_ctxt *dlm_alloc_ctxt(const char *domain, | |||
1296 | 1297 | ||
1297 | spin_lock_init(&dlm->work_lock); | 1298 | spin_lock_init(&dlm->work_lock); |
1298 | INIT_LIST_HEAD(&dlm->work_list); | 1299 | INIT_LIST_HEAD(&dlm->work_list); |
1299 | INIT_WORK(&dlm->dispatched_work, dlm_dispatch_work, dlm); | 1300 | INIT_WORK(&dlm->dispatched_work, dlm_dispatch_work); |
1300 | 1301 | ||
1301 | kref_init(&dlm->dlm_refs); | 1302 | kref_init(&dlm->dlm_refs); |
1302 | dlm->dlm_state = DLM_CTXT_NEW; | 1303 | dlm->dlm_state = DLM_CTXT_NEW; |
diff --git a/fs/ocfs2/dlm/dlmfs.c b/fs/ocfs2/dlm/dlmfs.c index 16b8d1ba7066..b7f0ba97a1a2 100644 --- a/fs/ocfs2/dlm/dlmfs.c +++ b/fs/ocfs2/dlm/dlmfs.c | |||
@@ -66,7 +66,7 @@ static struct file_operations dlmfs_file_operations; | |||
66 | static struct inode_operations dlmfs_dir_inode_operations; | 66 | static struct inode_operations dlmfs_dir_inode_operations; |
67 | static struct inode_operations dlmfs_root_inode_operations; | 67 | static struct inode_operations dlmfs_root_inode_operations; |
68 | static struct inode_operations dlmfs_file_inode_operations; | 68 | static struct inode_operations dlmfs_file_inode_operations; |
69 | static kmem_cache_t *dlmfs_inode_cache; | 69 | static struct kmem_cache *dlmfs_inode_cache; |
70 | 70 | ||
71 | struct workqueue_struct *user_dlm_worker; | 71 | struct workqueue_struct *user_dlm_worker; |
72 | 72 | ||
@@ -176,7 +176,7 @@ static ssize_t dlmfs_file_read(struct file *filp, | |||
176 | int bytes_left; | 176 | int bytes_left; |
177 | ssize_t readlen; | 177 | ssize_t readlen; |
178 | char *lvb_buf; | 178 | char *lvb_buf; |
179 | struct inode *inode = filp->f_dentry->d_inode; | 179 | struct inode *inode = filp->f_path.dentry->d_inode; |
180 | 180 | ||
181 | mlog(0, "inode %lu, count = %zu, *ppos = %llu\n", | 181 | mlog(0, "inode %lu, count = %zu, *ppos = %llu\n", |
182 | inode->i_ino, count, *ppos); | 182 | inode->i_ino, count, *ppos); |
@@ -220,7 +220,7 @@ static ssize_t dlmfs_file_write(struct file *filp, | |||
220 | int bytes_left; | 220 | int bytes_left; |
221 | ssize_t writelen; | 221 | ssize_t writelen; |
222 | char *lvb_buf; | 222 | char *lvb_buf; |
223 | struct inode *inode = filp->f_dentry->d_inode; | 223 | struct inode *inode = filp->f_path.dentry->d_inode; |
224 | 224 | ||
225 | mlog(0, "inode %lu, count = %zu, *ppos = %llu\n", | 225 | mlog(0, "inode %lu, count = %zu, *ppos = %llu\n", |
226 | inode->i_ino, count, *ppos); | 226 | inode->i_ino, count, *ppos); |
@@ -257,7 +257,7 @@ static ssize_t dlmfs_file_write(struct file *filp, | |||
257 | } | 257 | } |
258 | 258 | ||
259 | static void dlmfs_init_once(void *foo, | 259 | static void dlmfs_init_once(void *foo, |
260 | kmem_cache_t *cachep, | 260 | struct kmem_cache *cachep, |
261 | unsigned long flags) | 261 | unsigned long flags) |
262 | { | 262 | { |
263 | struct dlmfs_inode_private *ip = | 263 | struct dlmfs_inode_private *ip = |
@@ -276,7 +276,7 @@ static struct inode *dlmfs_alloc_inode(struct super_block *sb) | |||
276 | { | 276 | { |
277 | struct dlmfs_inode_private *ip; | 277 | struct dlmfs_inode_private *ip; |
278 | 278 | ||
279 | ip = kmem_cache_alloc(dlmfs_inode_cache, SLAB_NOFS); | 279 | ip = kmem_cache_alloc(dlmfs_inode_cache, GFP_NOFS); |
280 | if (!ip) | 280 | if (!ip) |
281 | return NULL; | 281 | return NULL; |
282 | 282 | ||
diff --git a/fs/ocfs2/dlm/dlmmaster.c b/fs/ocfs2/dlm/dlmmaster.c index f784177b6241..856012b4fa49 100644 --- a/fs/ocfs2/dlm/dlmmaster.c +++ b/fs/ocfs2/dlm/dlmmaster.c | |||
@@ -221,7 +221,7 @@ EXPORT_SYMBOL_GPL(dlm_dump_all_mles); | |||
221 | #endif /* 0 */ | 221 | #endif /* 0 */ |
222 | 222 | ||
223 | 223 | ||
224 | static kmem_cache_t *dlm_mle_cache = NULL; | 224 | static struct kmem_cache *dlm_mle_cache = NULL; |
225 | 225 | ||
226 | 226 | ||
227 | static void dlm_mle_release(struct kref *kref); | 227 | static void dlm_mle_release(struct kref *kref); |
diff --git a/fs/ocfs2/dlm/dlmrecovery.c b/fs/ocfs2/dlm/dlmrecovery.c index 9d950d7cea38..fb3e2b0817f1 100644 --- a/fs/ocfs2/dlm/dlmrecovery.c +++ b/fs/ocfs2/dlm/dlmrecovery.c | |||
@@ -153,9 +153,10 @@ static inline void dlm_reset_recovery(struct dlm_ctxt *dlm) | |||
153 | } | 153 | } |
154 | 154 | ||
155 | /* Worker function used during recovery. */ | 155 | /* Worker function used during recovery. */ |
156 | void dlm_dispatch_work(void *data) | 156 | void dlm_dispatch_work(struct work_struct *work) |
157 | { | 157 | { |
158 | struct dlm_ctxt *dlm = (struct dlm_ctxt *)data; | 158 | struct dlm_ctxt *dlm = |
159 | container_of(work, struct dlm_ctxt, dispatched_work); | ||
159 | LIST_HEAD(tmp_list); | 160 | LIST_HEAD(tmp_list); |
160 | struct list_head *iter, *iter2; | 161 | struct list_head *iter, *iter2; |
161 | struct dlm_work_item *item; | 162 | struct dlm_work_item *item; |
diff --git a/fs/ocfs2/dlm/userdlm.c b/fs/ocfs2/dlm/userdlm.c index eead48bbfac6..7d2f578b267d 100644 --- a/fs/ocfs2/dlm/userdlm.c +++ b/fs/ocfs2/dlm/userdlm.c | |||
@@ -171,15 +171,14 @@ static inline void user_dlm_grab_inode_ref(struct user_lock_res *lockres) | |||
171 | BUG(); | 171 | BUG(); |
172 | } | 172 | } |
173 | 173 | ||
174 | static void user_dlm_unblock_lock(void *opaque); | 174 | static void user_dlm_unblock_lock(struct work_struct *work); |
175 | 175 | ||
176 | static void __user_dlm_queue_lockres(struct user_lock_res *lockres) | 176 | static void __user_dlm_queue_lockres(struct user_lock_res *lockres) |
177 | { | 177 | { |
178 | if (!(lockres->l_flags & USER_LOCK_QUEUED)) { | 178 | if (!(lockres->l_flags & USER_LOCK_QUEUED)) { |
179 | user_dlm_grab_inode_ref(lockres); | 179 | user_dlm_grab_inode_ref(lockres); |
180 | 180 | ||
181 | INIT_WORK(&lockres->l_work, user_dlm_unblock_lock, | 181 | INIT_WORK(&lockres->l_work, user_dlm_unblock_lock); |
182 | lockres); | ||
183 | 182 | ||
184 | queue_work(user_dlm_worker, &lockres->l_work); | 183 | queue_work(user_dlm_worker, &lockres->l_work); |
185 | lockres->l_flags |= USER_LOCK_QUEUED; | 184 | lockres->l_flags |= USER_LOCK_QUEUED; |
@@ -279,10 +278,11 @@ static inline void user_dlm_drop_inode_ref(struct user_lock_res *lockres) | |||
279 | iput(inode); | 278 | iput(inode); |
280 | } | 279 | } |
281 | 280 | ||
282 | static void user_dlm_unblock_lock(void *opaque) | 281 | static void user_dlm_unblock_lock(struct work_struct *work) |
283 | { | 282 | { |
284 | int new_level, status; | 283 | int new_level, status; |
285 | struct user_lock_res *lockres = (struct user_lock_res *) opaque; | 284 | struct user_lock_res *lockres = |
285 | container_of(work, struct user_lock_res, l_work); | ||
286 | struct dlm_ctxt *dlm = dlm_ctxt_from_user_lockres(lockres); | 286 | struct dlm_ctxt *dlm = dlm_ctxt_from_user_lockres(lockres); |
287 | 287 | ||
288 | mlog(0, "processing lockres %.*s\n", lockres->l_namelen, | 288 | mlog(0, "processing lockres %.*s\n", lockres->l_namelen, |