diff options
Diffstat (limited to 'fs/ocfs2')
-rw-r--r-- | fs/ocfs2/aops.c | 2 | ||||
-rw-r--r-- | fs/ocfs2/cluster/heartbeat.c | 2 | ||||
-rw-r--r-- | fs/ocfs2/cluster/tcp.c | 2 | ||||
-rw-r--r-- | fs/ocfs2/dlm/dlmdomain.c | 2 | ||||
-rw-r--r-- | fs/ocfs2/dlm/dlmlock.c | 2 | ||||
-rw-r--r-- | fs/ocfs2/dlm/dlmrecovery.c | 4 | ||||
-rw-r--r-- | fs/ocfs2/dlmglue.c | 2 | ||||
-rw-r--r-- | fs/ocfs2/inode.h | 2 | ||||
-rw-r--r-- | fs/ocfs2/journal.c | 2 | ||||
-rw-r--r-- | fs/ocfs2/vote.c | 8 |
10 files changed, 12 insertions, 16 deletions
diff --git a/fs/ocfs2/aops.c b/fs/ocfs2/aops.c index 47152bf9a7f2..cca71317b6d6 100644 --- a/fs/ocfs2/aops.c +++ b/fs/ocfs2/aops.c | |||
@@ -666,7 +666,7 @@ out: | |||
666 | return ret; | 666 | return ret; |
667 | } | 667 | } |
668 | 668 | ||
669 | struct address_space_operations ocfs2_aops = { | 669 | const struct address_space_operations ocfs2_aops = { |
670 | .readpage = ocfs2_readpage, | 670 | .readpage = ocfs2_readpage, |
671 | .writepage = ocfs2_writepage, | 671 | .writepage = ocfs2_writepage, |
672 | .prepare_write = ocfs2_prepare_write, | 672 | .prepare_write = ocfs2_prepare_write, |
diff --git a/fs/ocfs2/cluster/heartbeat.c b/fs/ocfs2/cluster/heartbeat.c index 21f38accd039..1d26cfcd9f84 100644 --- a/fs/ocfs2/cluster/heartbeat.c +++ b/fs/ocfs2/cluster/heartbeat.c | |||
@@ -54,7 +54,7 @@ static DECLARE_RWSEM(o2hb_callback_sem); | |||
54 | * multiple hb threads are watching multiple regions. A node is live | 54 | * multiple hb threads are watching multiple regions. A node is live |
55 | * whenever any of the threads sees activity from the node in its region. | 55 | * whenever any of the threads sees activity from the node in its region. |
56 | */ | 56 | */ |
57 | static spinlock_t o2hb_live_lock = SPIN_LOCK_UNLOCKED; | 57 | static DEFINE_SPINLOCK(o2hb_live_lock); |
58 | static struct list_head o2hb_live_slots[O2NM_MAX_NODES]; | 58 | static struct list_head o2hb_live_slots[O2NM_MAX_NODES]; |
59 | static unsigned long o2hb_live_node_bitmap[BITS_TO_LONGS(O2NM_MAX_NODES)]; | 59 | static unsigned long o2hb_live_node_bitmap[BITS_TO_LONGS(O2NM_MAX_NODES)]; |
60 | static LIST_HEAD(o2hb_node_events); | 60 | static LIST_HEAD(o2hb_node_events); |
diff --git a/fs/ocfs2/cluster/tcp.c b/fs/ocfs2/cluster/tcp.c index 0f60cc0d3985..1591eb37a723 100644 --- a/fs/ocfs2/cluster/tcp.c +++ b/fs/ocfs2/cluster/tcp.c | |||
@@ -108,7 +108,7 @@ | |||
108 | ##args); \ | 108 | ##args); \ |
109 | } while (0) | 109 | } while (0) |
110 | 110 | ||
111 | static rwlock_t o2net_handler_lock = RW_LOCK_UNLOCKED; | 111 | static DEFINE_RWLOCK(o2net_handler_lock); |
112 | static struct rb_root o2net_handler_tree = RB_ROOT; | 112 | static struct rb_root o2net_handler_tree = RB_ROOT; |
113 | 113 | ||
114 | static struct o2net_node o2net_nodes[O2NM_MAX_NODES]; | 114 | static struct o2net_node o2net_nodes[O2NM_MAX_NODES]; |
diff --git a/fs/ocfs2/dlm/dlmdomain.c b/fs/ocfs2/dlm/dlmdomain.c index ba27c5c5e959..b8c23f7ba67e 100644 --- a/fs/ocfs2/dlm/dlmdomain.c +++ b/fs/ocfs2/dlm/dlmdomain.c | |||
@@ -88,7 +88,7 @@ out_free: | |||
88 | * | 88 | * |
89 | */ | 89 | */ |
90 | 90 | ||
91 | spinlock_t dlm_domain_lock = SPIN_LOCK_UNLOCKED; | 91 | DEFINE_SPINLOCK(dlm_domain_lock); |
92 | LIST_HEAD(dlm_domains); | 92 | LIST_HEAD(dlm_domains); |
93 | static DECLARE_WAIT_QUEUE_HEAD(dlm_domain_events); | 93 | static DECLARE_WAIT_QUEUE_HEAD(dlm_domain_events); |
94 | 94 | ||
diff --git a/fs/ocfs2/dlm/dlmlock.c b/fs/ocfs2/dlm/dlmlock.c index d6f89577e25f..5ca57ec650c7 100644 --- a/fs/ocfs2/dlm/dlmlock.c +++ b/fs/ocfs2/dlm/dlmlock.c | |||
@@ -53,7 +53,7 @@ | |||
53 | #define MLOG_MASK_PREFIX ML_DLM | 53 | #define MLOG_MASK_PREFIX ML_DLM |
54 | #include "cluster/masklog.h" | 54 | #include "cluster/masklog.h" |
55 | 55 | ||
56 | static spinlock_t dlm_cookie_lock = SPIN_LOCK_UNLOCKED; | 56 | static DEFINE_SPINLOCK(dlm_cookie_lock); |
57 | static u64 dlm_next_cookie = 1; | 57 | static u64 dlm_next_cookie = 1; |
58 | 58 | ||
59 | static enum dlm_status dlm_send_remote_lock_request(struct dlm_ctxt *dlm, | 59 | static enum dlm_status dlm_send_remote_lock_request(struct dlm_ctxt *dlm, |
diff --git a/fs/ocfs2/dlm/dlmrecovery.c b/fs/ocfs2/dlm/dlmrecovery.c index da399013516f..29b2845f370d 100644 --- a/fs/ocfs2/dlm/dlmrecovery.c +++ b/fs/ocfs2/dlm/dlmrecovery.c | |||
@@ -98,8 +98,8 @@ static void dlm_mig_lockres_worker(struct dlm_work_item *item, void *data); | |||
98 | 98 | ||
99 | static u64 dlm_get_next_mig_cookie(void); | 99 | static u64 dlm_get_next_mig_cookie(void); |
100 | 100 | ||
101 | static spinlock_t dlm_reco_state_lock = SPIN_LOCK_UNLOCKED; | 101 | static DEFINE_SPINLOCK(dlm_reco_state_lock); |
102 | static spinlock_t dlm_mig_cookie_lock = SPIN_LOCK_UNLOCKED; | 102 | static DEFINE_SPINLOCK(dlm_mig_cookie_lock); |
103 | static u64 dlm_mig_cookie = 1; | 103 | static u64 dlm_mig_cookie = 1; |
104 | 104 | ||
105 | static u64 dlm_get_next_mig_cookie(void) | 105 | static u64 dlm_get_next_mig_cookie(void) |
diff --git a/fs/ocfs2/dlmglue.c b/fs/ocfs2/dlmglue.c index 64cd52860c87..4acd37286bdd 100644 --- a/fs/ocfs2/dlmglue.c +++ b/fs/ocfs2/dlmglue.c | |||
@@ -242,7 +242,7 @@ static void ocfs2_build_lock_name(enum ocfs2_lock_type type, | |||
242 | mlog_exit_void(); | 242 | mlog_exit_void(); |
243 | } | 243 | } |
244 | 244 | ||
245 | static spinlock_t ocfs2_dlm_tracking_lock = SPIN_LOCK_UNLOCKED; | 245 | static DEFINE_SPINLOCK(ocfs2_dlm_tracking_lock); |
246 | 246 | ||
247 | static void ocfs2_add_lockres_tracking(struct ocfs2_lock_res *res, | 247 | static void ocfs2_add_lockres_tracking(struct ocfs2_lock_res *res, |
248 | struct ocfs2_dlm_debug *dlm_debug) | 248 | struct ocfs2_dlm_debug *dlm_debug) |
diff --git a/fs/ocfs2/inode.h b/fs/ocfs2/inode.h index 84c507961287..35140f6cf840 100644 --- a/fs/ocfs2/inode.h +++ b/fs/ocfs2/inode.h | |||
@@ -114,7 +114,7 @@ static inline struct ocfs2_inode_info *OCFS2_I(struct inode *inode) | |||
114 | 114 | ||
115 | extern kmem_cache_t *ocfs2_inode_cache; | 115 | extern kmem_cache_t *ocfs2_inode_cache; |
116 | 116 | ||
117 | extern struct address_space_operations ocfs2_aops; | 117 | extern const struct address_space_operations ocfs2_aops; |
118 | 118 | ||
119 | struct buffer_head *ocfs2_bread(struct inode *inode, int block, | 119 | struct buffer_head *ocfs2_bread(struct inode *inode, int block, |
120 | int *err, int reada); | 120 | int *err, int reada); |
diff --git a/fs/ocfs2/journal.c b/fs/ocfs2/journal.c index 3fe8781c22cb..910a601b2e98 100644 --- a/fs/ocfs2/journal.c +++ b/fs/ocfs2/journal.c | |||
@@ -49,7 +49,7 @@ | |||
49 | 49 | ||
50 | #include "buffer_head_io.h" | 50 | #include "buffer_head_io.h" |
51 | 51 | ||
52 | spinlock_t trans_inc_lock = SPIN_LOCK_UNLOCKED; | 52 | DEFINE_SPINLOCK(trans_inc_lock); |
53 | 53 | ||
54 | static int ocfs2_force_read_journal(struct inode *inode); | 54 | static int ocfs2_force_read_journal(struct inode *inode); |
55 | static int ocfs2_recover_node(struct ocfs2_super *osb, | 55 | static int ocfs2_recover_node(struct ocfs2_super *osb, |
diff --git a/fs/ocfs2/vote.c b/fs/ocfs2/vote.c index ee42765a8553..cf70fe2075b8 100644 --- a/fs/ocfs2/vote.c +++ b/fs/ocfs2/vote.c | |||
@@ -988,9 +988,7 @@ int ocfs2_request_mount_vote(struct ocfs2_super *osb) | |||
988 | } | 988 | } |
989 | 989 | ||
990 | bail: | 990 | bail: |
991 | if (request) | 991 | kfree(request); |
992 | kfree(request); | ||
993 | |||
994 | return status; | 992 | return status; |
995 | } | 993 | } |
996 | 994 | ||
@@ -1021,9 +1019,7 @@ int ocfs2_request_umount_vote(struct ocfs2_super *osb) | |||
1021 | } | 1019 | } |
1022 | 1020 | ||
1023 | bail: | 1021 | bail: |
1024 | if (request) | 1022 | kfree(request); |
1025 | kfree(request); | ||
1026 | |||
1027 | return status; | 1023 | return status; |
1028 | } | 1024 | } |
1029 | 1025 | ||