diff options
author | Denis Cheng <crquan@gmail.com> | 2007-07-31 06:31:11 -0400 |
---|---|---|
committer | Steven Whitehouse <swhiteho@redhat.com> | 2007-10-10 03:55:03 -0400 |
commit | 4ef290025ccde7c52ba219cf733a4295acd5401f (patch) | |
tree | 9879ae00580d4869bfa0a443f00b3713c34f4bda | |
parent | 0f8468c8bef3d04637c924e7bef20ca53018b319 (diff) |
[GFS2] mark struct *_operations const
these struct *_operations are all method tables, thus should be const.
Signed-off-by: Denis Cheng <crquan@gmail.com>
Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
-rw-r--r-- | fs/gfs2/eaops.c | 8 | ||||
-rw-r--r-- | fs/gfs2/eaops.h | 4 | ||||
-rw-r--r-- | fs/gfs2/glock.c | 2 |
3 files changed, 7 insertions, 7 deletions
diff --git a/fs/gfs2/eaops.c b/fs/gfs2/eaops.c index 1ab3e9d73886..aa8dbf303f6d 100644 --- a/fs/gfs2/eaops.c +++ b/fs/gfs2/eaops.c | |||
@@ -200,28 +200,28 @@ static int security_eo_remove(struct gfs2_inode *ip, struct gfs2_ea_request *er) | |||
200 | return gfs2_ea_remove_i(ip, er); | 200 | return gfs2_ea_remove_i(ip, er); |
201 | } | 201 | } |
202 | 202 | ||
203 | static struct gfs2_eattr_operations gfs2_user_eaops = { | 203 | static const struct gfs2_eattr_operations gfs2_user_eaops = { |
204 | .eo_get = user_eo_get, | 204 | .eo_get = user_eo_get, |
205 | .eo_set = user_eo_set, | 205 | .eo_set = user_eo_set, |
206 | .eo_remove = user_eo_remove, | 206 | .eo_remove = user_eo_remove, |
207 | .eo_name = "user", | 207 | .eo_name = "user", |
208 | }; | 208 | }; |
209 | 209 | ||
210 | struct gfs2_eattr_operations gfs2_system_eaops = { | 210 | const struct gfs2_eattr_operations gfs2_system_eaops = { |
211 | .eo_get = system_eo_get, | 211 | .eo_get = system_eo_get, |
212 | .eo_set = system_eo_set, | 212 | .eo_set = system_eo_set, |
213 | .eo_remove = system_eo_remove, | 213 | .eo_remove = system_eo_remove, |
214 | .eo_name = "system", | 214 | .eo_name = "system", |
215 | }; | 215 | }; |
216 | 216 | ||
217 | static struct gfs2_eattr_operations gfs2_security_eaops = { | 217 | static const struct gfs2_eattr_operations gfs2_security_eaops = { |
218 | .eo_get = security_eo_get, | 218 | .eo_get = security_eo_get, |
219 | .eo_set = security_eo_set, | 219 | .eo_set = security_eo_set, |
220 | .eo_remove = security_eo_remove, | 220 | .eo_remove = security_eo_remove, |
221 | .eo_name = "security", | 221 | .eo_name = "security", |
222 | }; | 222 | }; |
223 | 223 | ||
224 | struct gfs2_eattr_operations *gfs2_ea_ops[] = { | 224 | const struct gfs2_eattr_operations *gfs2_ea_ops[] = { |
225 | NULL, | 225 | NULL, |
226 | &gfs2_user_eaops, | 226 | &gfs2_user_eaops, |
227 | &gfs2_system_eaops, | 227 | &gfs2_system_eaops, |
diff --git a/fs/gfs2/eaops.h b/fs/gfs2/eaops.h index 508b4f7a2449..da2f7fbbb40d 100644 --- a/fs/gfs2/eaops.h +++ b/fs/gfs2/eaops.h | |||
@@ -22,9 +22,9 @@ struct gfs2_eattr_operations { | |||
22 | 22 | ||
23 | unsigned int gfs2_ea_name2type(const char *name, const char **truncated_name); | 23 | unsigned int gfs2_ea_name2type(const char *name, const char **truncated_name); |
24 | 24 | ||
25 | extern struct gfs2_eattr_operations gfs2_system_eaops; | 25 | extern const struct gfs2_eattr_operations gfs2_system_eaops; |
26 | 26 | ||
27 | extern struct gfs2_eattr_operations *gfs2_ea_ops[]; | 27 | extern const struct gfs2_eattr_operations *gfs2_ea_ops[]; |
28 | 28 | ||
29 | #endif /* __EAOPS_DOT_H__ */ | 29 | #endif /* __EAOPS_DOT_H__ */ |
30 | 30 | ||
diff --git a/fs/gfs2/glock.c b/fs/gfs2/glock.c index e4bc8ae561aa..0054b7df714a 100644 --- a/fs/gfs2/glock.c +++ b/fs/gfs2/glock.c | |||
@@ -2103,7 +2103,7 @@ static int gfs2_glock_seq_show(struct seq_file *file, void *iter_ptr) | |||
2103 | return 0; | 2103 | return 0; |
2104 | } | 2104 | } |
2105 | 2105 | ||
2106 | static struct seq_operations gfs2_glock_seq_ops = { | 2106 | static const struct seq_operations gfs2_glock_seq_ops = { |
2107 | .start = gfs2_glock_seq_start, | 2107 | .start = gfs2_glock_seq_start, |
2108 | .next = gfs2_glock_seq_next, | 2108 | .next = gfs2_glock_seq_next, |
2109 | .stop = gfs2_glock_seq_stop, | 2109 | .stop = gfs2_glock_seq_stop, |