summaryrefslogtreecommitdiff
path: root/fs/squashfs
diff options
context:
space:
mode:
authorPhillip Lougher <phillip@lougher.demon.co.uk>2010-05-23 03:29:26 +0100
committerPhillip Lougher <phillip@lougher.demon.co.uk>2010-05-23 03:35:05 +0100
commitf6db25a87643fa6108e211da0397423593ca36fe (patch)
tree5bf431bf1efea38a57186f4dc595966d4187e324 /fs/squashfs
parent0f87ee08564b95389e609699990725efd282021c (diff)
downloadlinux-3.10-f6db25a87643fa6108e211da0397423593ca36fe.tar.gz
linux-3.10-f6db25a87643fa6108e211da0397423593ca36fe.tar.bz2
linux-3.10-f6db25a87643fa6108e211da0397423593ca36fe.zip
squashfs: constify xattr handlers
Signed-off-by: Phillip Lougher <phillip@lougher.demon.co.uk>
Diffstat (limited to 'fs/squashfs')
-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 305ce15d2d2..733a17c4294 100644
--- a/fs/squashfs/squashfs.h
+++ b/fs/squashfs/squashfs.h
@@ -100,7 +100,7 @@ extern const struct address_space_operations squashfs_symlink_aops;
extern const struct inode_operations squashfs_symlink_inode_ops;
/* xattr.c */
-extern struct xattr_handler *squashfs_xattr_handlers[];
+extern const struct xattr_handler *squashfs_xattr_handlers[];
/* zlib_wrapper.c */
extern const struct squashfs_decompressor squashfs_zlib_comp_ops;
diff --git a/fs/squashfs/xattr.c b/fs/squashfs/xattr.c
index de03889050b..14a2feef09b 100644
--- a/fs/squashfs/xattr.c
+++ b/fs/squashfs/xattr.c
@@ -34,7 +34,7 @@
#include "squashfs_fs_i.h"
#include "squashfs.h"
-static struct xattr_handler *squashfs_xattr_handler(int);
+static const struct xattr_handler *squashfs_xattr_handler(int);
ssize_t squashfs_listxattr(struct dentry *d, char *buffer,
size_t buffer_size)
@@ -57,7 +57,7 @@ ssize_t squashfs_listxattr(struct dentry *d, char *buffer,
while (count--) {
struct squashfs_xattr_entry entry;
struct squashfs_xattr_val val;
- struct xattr_handler *handler;
+ const struct xattr_handler *handler;
int name_size, prefix_size = 0;
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,
buffer, size);
}
-static struct xattr_handler squashfs_xattr_user_handler = {
+static const struct xattr_handler squashfs_xattr_user_handler = {
.prefix = XATTR_USER_PREFIX,
.list = squashfs_user_list,
.get = squashfs_user_get
@@ -258,7 +258,7 @@ static int squashfs_trusted_get(struct dentry *d, const char *name,
buffer, size);
}
-static struct xattr_handler squashfs_xattr_trusted_handler = {
+static const struct xattr_handler squashfs_xattr_trusted_handler = {
.prefix = XATTR_TRUSTED_PREFIX,
.list = squashfs_trusted_list,
.get = squashfs_trusted_get
@@ -285,13 +285,13 @@ static int squashfs_security_get(struct dentry *d, const char *name,
buffer, size);
}
-static struct xattr_handler squashfs_xattr_security_handler = {
+static const struct xattr_handler squashfs_xattr_security_handler = {
.prefix = XATTR_SECURITY_PREFIX,
.list = squashfs_security_list,
.get = squashfs_security_get
};
-static inline struct xattr_handler *squashfs_xattr_handler(int type)
+static inline const struct xattr_handler *squashfs_xattr_handler(int type)
{
if (type & ~(SQUASHFS_XATTR_PREFIX_MASK | SQUASHFS_XATTR_VALUE_OOL))
/* ignore unrecognised type */
@@ -310,7 +310,7 @@ static inline struct xattr_handler *squashfs_xattr_handler(int type)
}
}
-struct xattr_handler *squashfs_xattr_handlers[] = {
+const struct xattr_handler *squashfs_xattr_handlers[] = {
&squashfs_xattr_user_handler,
&squashfs_xattr_trusted_handler,
&squashfs_xattr_security_handler,