aboutsummaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
Diffstat (limited to 'fs')
-rw-r--r--fs/squashfs/squashfs.h2
-rw-r--r--fs/squashfs/xattr.c14
2 files changed, 8 insertions, 8 deletions
diff --git a/fs/squashfs/squashfs.h b/fs/squashfs/squashfs.h
index 305ce15d2d2d..733a17c42945 100644
--- a/fs/squashfs/squashfs.h
+++ b/fs/squashfs/squashfs.h
@@ -100,7 +100,7 @@ extern const struct address_space_operations squashfs_symlink_aops;
100extern const struct inode_operations squashfs_symlink_inode_ops; 100extern const struct inode_operations squashfs_symlink_inode_ops;
101 101
102/* xattr.c */ 102/* xattr.c */
103extern struct xattr_handler *squashfs_xattr_handlers[]; 103extern const struct xattr_handler *squashfs_xattr_handlers[];
104 104
105/* zlib_wrapper.c */ 105/* zlib_wrapper.c */
106extern const struct squashfs_decompressor squashfs_zlib_comp_ops; 106extern const struct squashfs_decompressor squashfs_zlib_comp_ops;
diff --git a/fs/squashfs/xattr.c b/fs/squashfs/xattr.c
index de03889050b1..14a2feef09b9 100644
--- a/fs/squashfs/xattr.c
+++ b/fs/squashfs/xattr.c
@@ -34,7 +34,7 @@
34#include "squashfs_fs_i.h" 34#include "squashfs_fs_i.h"
35#include "squashfs.h" 35#include "squashfs.h"
36 36
37static struct xattr_handler *squashfs_xattr_handler(int); 37static const struct xattr_handler *squashfs_xattr_handler(int);
38 38
39ssize_t squashfs_listxattr(struct dentry *d, char *buffer, 39ssize_t squashfs_listxattr(struct dentry *d, char *buffer,
40 size_t buffer_size) 40 size_t buffer_size)
@@ -57,7 +57,7 @@ ssize_t squashfs_listxattr(struct dentry *d, char *buffer,
57 while (count--) { 57 while (count--) {
58 struct squashfs_xattr_entry entry; 58 struct squashfs_xattr_entry entry;
59 struct squashfs_xattr_val val; 59 struct squashfs_xattr_val val;
60 struct xattr_handler *handler; 60 const struct xattr_handler *handler;
61 int name_size, prefix_size = 0; 61 int name_size, prefix_size = 0;
62 62
63 err = squashfs_read_metadata(sb, &entry, &start, &offset, 63 err = squashfs_read_metadata(sb, &entry, &start, &offset,
@@ -228,7 +228,7 @@ static int squashfs_user_get(struct dentry *d, const char *name, void *buffer,
228 buffer, size); 228 buffer, size);
229} 229}
230 230
231static struct xattr_handler squashfs_xattr_user_handler = { 231static const struct xattr_handler squashfs_xattr_user_handler = {
232 .prefix = XATTR_USER_PREFIX, 232 .prefix = XATTR_USER_PREFIX,
233 .list = squashfs_user_list, 233 .list = squashfs_user_list,
234 .get = squashfs_user_get 234 .get = squashfs_user_get
@@ -258,7 +258,7 @@ static int squashfs_trusted_get(struct dentry *d, const char *name,
258 buffer, size); 258 buffer, size);
259} 259}
260 260
261static struct xattr_handler squashfs_xattr_trusted_handler = { 261static const struct xattr_handler squashfs_xattr_trusted_handler = {
262 .prefix = XATTR_TRUSTED_PREFIX, 262 .prefix = XATTR_TRUSTED_PREFIX,
263 .list = squashfs_trusted_list, 263 .list = squashfs_trusted_list,
264 .get = squashfs_trusted_get 264 .get = squashfs_trusted_get
@@ -285,13 +285,13 @@ static int squashfs_security_get(struct dentry *d, const char *name,
285 buffer, size); 285 buffer, size);
286} 286}
287 287
288static struct xattr_handler squashfs_xattr_security_handler = { 288static const struct xattr_handler squashfs_xattr_security_handler = {
289 .prefix = XATTR_SECURITY_PREFIX, 289 .prefix = XATTR_SECURITY_PREFIX,
290 .list = squashfs_security_list, 290 .list = squashfs_security_list,
291 .get = squashfs_security_get 291 .get = squashfs_security_get
292}; 292};
293 293
294static inline struct xattr_handler *squashfs_xattr_handler(int type) 294static inline const struct xattr_handler *squashfs_xattr_handler(int type)
295{ 295{
296 if (type & ~(SQUASHFS_XATTR_PREFIX_MASK | SQUASHFS_XATTR_VALUE_OOL)) 296 if (type & ~(SQUASHFS_XATTR_PREFIX_MASK | SQUASHFS_XATTR_VALUE_OOL))
297 /* ignore unrecognised type */ 297 /* ignore unrecognised type */
@@ -310,7 +310,7 @@ static inline struct xattr_handler *squashfs_xattr_handler(int type)
310 } 310 }
311} 311}
312 312
313struct xattr_handler *squashfs_xattr_handlers[] = { 313const struct xattr_handler *squashfs_xattr_handlers[] = {
314 &squashfs_xattr_user_handler, 314 &squashfs_xattr_user_handler,
315 &squashfs_xattr_trusted_handler, 315 &squashfs_xattr_trusted_handler,
316 &squashfs_xattr_security_handler, 316 &squashfs_xattr_security_handler,