diff options
Diffstat (limited to 'fs/dlm/dlm_internal.h')
-rw-r--r-- | fs/dlm/dlm_internal.h | 23 |
1 files changed, 5 insertions, 18 deletions
diff --git a/fs/dlm/dlm_internal.h b/fs/dlm/dlm_internal.h index 0020cd07baf7..16f20cfd9197 100644 --- a/fs/dlm/dlm_internal.h +++ b/fs/dlm/dlm_internal.h | |||
@@ -35,6 +35,7 @@ | |||
35 | #include <linux/kref.h> | 35 | #include <linux/kref.h> |
36 | #include <linux/kernel.h> | 36 | #include <linux/kernel.h> |
37 | #include <linux/jhash.h> | 37 | #include <linux/jhash.h> |
38 | #include <linux/mutex.h> | ||
38 | #include <asm/semaphore.h> | 39 | #include <asm/semaphore.h> |
39 | #include <asm/uaccess.h> | 40 | #include <asm/uaccess.h> |
40 | 41 | ||
@@ -42,20 +43,6 @@ | |||
42 | 43 | ||
43 | #define DLM_LOCKSPACE_LEN 64 | 44 | #define DLM_LOCKSPACE_LEN 64 |
44 | 45 | ||
45 | #ifndef TRUE | ||
46 | #define TRUE 1 | ||
47 | #endif | ||
48 | |||
49 | #ifndef FALSE | ||
50 | #define FALSE 0 | ||
51 | #endif | ||
52 | |||
53 | #if (BITS_PER_LONG == 64) | ||
54 | #define PRIx64 "lx" | ||
55 | #else | ||
56 | #define PRIx64 "Lx" | ||
57 | #endif | ||
58 | |||
59 | /* Size of the temp buffer midcomms allocates on the stack. | 46 | /* Size of the temp buffer midcomms allocates on the stack. |
60 | We try to make this large enough so most messages fit. | 47 | We try to make this large enough so most messages fit. |
61 | FIXME: should sctp make this unnecessary? */ | 48 | FIXME: should sctp make this unnecessary? */ |
@@ -266,7 +253,7 @@ struct dlm_lkb { | |||
266 | struct dlm_rsb { | 253 | struct dlm_rsb { |
267 | struct dlm_ls *res_ls; /* the lockspace */ | 254 | struct dlm_ls *res_ls; /* the lockspace */ |
268 | struct kref res_ref; | 255 | struct kref res_ref; |
269 | struct semaphore res_sem; | 256 | struct mutex res_mutex; |
270 | unsigned long res_flags; | 257 | unsigned long res_flags; |
271 | int res_length; /* length of rsb name */ | 258 | int res_length; /* length of rsb name */ |
272 | int res_nodeid; | 259 | int res_nodeid; |
@@ -449,7 +436,7 @@ struct dlm_ls { | |||
449 | struct dlm_dirtable *ls_dirtbl; | 436 | struct dlm_dirtable *ls_dirtbl; |
450 | uint32_t ls_dirtbl_size; | 437 | uint32_t ls_dirtbl_size; |
451 | 438 | ||
452 | struct semaphore ls_waiters_sem; | 439 | struct mutex ls_waiters_mutex; |
453 | struct list_head ls_waiters; /* lkbs needing a reply */ | 440 | struct list_head ls_waiters; /* lkbs needing a reply */ |
454 | 441 | ||
455 | struct list_head ls_nodes; /* current nodes in ls */ | 442 | struct list_head ls_nodes; /* current nodes in ls */ |
@@ -472,14 +459,14 @@ struct dlm_ls { | |||
472 | 459 | ||
473 | struct timer_list ls_timer; | 460 | struct timer_list ls_timer; |
474 | struct task_struct *ls_recoverd_task; | 461 | struct task_struct *ls_recoverd_task; |
475 | struct semaphore ls_recoverd_active; | 462 | struct mutex ls_recoverd_active; |
476 | spinlock_t ls_recover_lock; | 463 | spinlock_t ls_recover_lock; |
477 | uint32_t ls_recover_status; /* DLM_RS_ */ | 464 | uint32_t ls_recover_status; /* DLM_RS_ */ |
478 | uint64_t ls_recover_seq; | 465 | uint64_t ls_recover_seq; |
479 | struct dlm_recover *ls_recover_args; | 466 | struct dlm_recover *ls_recover_args; |
480 | struct rw_semaphore ls_in_recovery; /* block local requests */ | 467 | struct rw_semaphore ls_in_recovery; /* block local requests */ |
481 | struct list_head ls_requestqueue;/* queue remote requests */ | 468 | struct list_head ls_requestqueue;/* queue remote requests */ |
482 | struct semaphore ls_requestqueue_lock; | 469 | struct mutex ls_requestqueue_mutex; |
483 | char *ls_recover_buf; | 470 | char *ls_recover_buf; |
484 | struct list_head ls_recover_list; | 471 | struct list_head ls_recover_list; |
485 | spinlock_t ls_recover_list_lock; | 472 | spinlock_t ls_recover_list_lock; |