Commit 537d81ca authored by Stephen Hemminger's avatar Stephen Hemminger Committed by Al Viro

ocfs: constify xattr_handler

Signed-off-by: default avatarStephen Hemminger <shemminger@vyatta.com>
Signed-off-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
parent 365f0cb9
...@@ -489,7 +489,7 @@ static int ocfs2_xattr_set_acl(struct dentry *dentry, const char *name, ...@@ -489,7 +489,7 @@ static int ocfs2_xattr_set_acl(struct dentry *dentry, const char *name,
return ret; return ret;
} }
struct xattr_handler ocfs2_xattr_acl_access_handler = { const struct xattr_handler ocfs2_xattr_acl_access_handler = {
.prefix = POSIX_ACL_XATTR_ACCESS, .prefix = POSIX_ACL_XATTR_ACCESS,
.flags = ACL_TYPE_ACCESS, .flags = ACL_TYPE_ACCESS,
.list = ocfs2_xattr_list_acl_access, .list = ocfs2_xattr_list_acl_access,
...@@ -497,7 +497,7 @@ struct xattr_handler ocfs2_xattr_acl_access_handler = { ...@@ -497,7 +497,7 @@ struct xattr_handler ocfs2_xattr_acl_access_handler = {
.set = ocfs2_xattr_set_acl, .set = ocfs2_xattr_set_acl,
}; };
struct xattr_handler ocfs2_xattr_acl_default_handler = { const struct xattr_handler ocfs2_xattr_acl_default_handler = {
.prefix = POSIX_ACL_XATTR_DEFAULT, .prefix = POSIX_ACL_XATTR_DEFAULT,
.flags = ACL_TYPE_DEFAULT, .flags = ACL_TYPE_DEFAULT,
.list = ocfs2_xattr_list_acl_default, .list = ocfs2_xattr_list_acl_default,
......
...@@ -97,7 +97,7 @@ static struct ocfs2_xattr_def_value_root def_xv = { ...@@ -97,7 +97,7 @@ static struct ocfs2_xattr_def_value_root def_xv = {
.xv.xr_list.l_count = cpu_to_le16(1), .xv.xr_list.l_count = cpu_to_le16(1),
}; };
struct xattr_handler *ocfs2_xattr_handlers[] = { const struct xattr_handler *ocfs2_xattr_handlers[] = {
&ocfs2_xattr_user_handler, &ocfs2_xattr_user_handler,
&ocfs2_xattr_acl_access_handler, &ocfs2_xattr_acl_access_handler,
&ocfs2_xattr_acl_default_handler, &ocfs2_xattr_acl_default_handler,
...@@ -106,7 +106,7 @@ struct xattr_handler *ocfs2_xattr_handlers[] = { ...@@ -106,7 +106,7 @@ struct xattr_handler *ocfs2_xattr_handlers[] = {
NULL NULL
}; };
static struct xattr_handler *ocfs2_xattr_handler_map[OCFS2_XATTR_MAX] = { static const struct xattr_handler *ocfs2_xattr_handler_map[OCFS2_XATTR_MAX] = {
[OCFS2_XATTR_INDEX_USER] = &ocfs2_xattr_user_handler, [OCFS2_XATTR_INDEX_USER] = &ocfs2_xattr_user_handler,
[OCFS2_XATTR_INDEX_POSIX_ACL_ACCESS] [OCFS2_XATTR_INDEX_POSIX_ACL_ACCESS]
= &ocfs2_xattr_acl_access_handler, = &ocfs2_xattr_acl_access_handler,
...@@ -540,7 +540,7 @@ static int ocfs2_read_xattr_block(struct inode *inode, u64 xb_blkno, ...@@ -540,7 +540,7 @@ static int ocfs2_read_xattr_block(struct inode *inode, u64 xb_blkno,
static inline const char *ocfs2_xattr_prefix(int name_index) static inline const char *ocfs2_xattr_prefix(int name_index)
{ {
struct xattr_handler *handler = NULL; const struct xattr_handler *handler = NULL;
if (name_index > 0 && name_index < OCFS2_XATTR_MAX) if (name_index > 0 && name_index < OCFS2_XATTR_MAX)
handler = ocfs2_xattr_handler_map[name_index]; handler = ocfs2_xattr_handler_map[name_index];
...@@ -7213,7 +7213,7 @@ int ocfs2_init_security_set(handle_t *handle, ...@@ -7213,7 +7213,7 @@ int ocfs2_init_security_set(handle_t *handle,
xattr_ac, data_ac); xattr_ac, data_ac);
} }
struct xattr_handler ocfs2_xattr_security_handler = { const struct xattr_handler ocfs2_xattr_security_handler = {
.prefix = XATTR_SECURITY_PREFIX, .prefix = XATTR_SECURITY_PREFIX,
.list = ocfs2_xattr_security_list, .list = ocfs2_xattr_security_list,
.get = ocfs2_xattr_security_get, .get = ocfs2_xattr_security_get,
...@@ -7257,7 +7257,7 @@ static int ocfs2_xattr_trusted_set(struct dentry *dentry, const char *name, ...@@ -7257,7 +7257,7 @@ static int ocfs2_xattr_trusted_set(struct dentry *dentry, const char *name,
name, value, size, flags); name, value, size, flags);
} }
struct xattr_handler ocfs2_xattr_trusted_handler = { const struct xattr_handler ocfs2_xattr_trusted_handler = {
.prefix = XATTR_TRUSTED_PREFIX, .prefix = XATTR_TRUSTED_PREFIX,
.list = ocfs2_xattr_trusted_list, .list = ocfs2_xattr_trusted_list,
.get = ocfs2_xattr_trusted_get, .get = ocfs2_xattr_trusted_get,
...@@ -7313,7 +7313,7 @@ static int ocfs2_xattr_user_set(struct dentry *dentry, const char *name, ...@@ -7313,7 +7313,7 @@ static int ocfs2_xattr_user_set(struct dentry *dentry, const char *name,
name, value, size, flags); name, value, size, flags);
} }
struct xattr_handler ocfs2_xattr_user_handler = { const struct xattr_handler ocfs2_xattr_user_handler = {
.prefix = XATTR_USER_PREFIX, .prefix = XATTR_USER_PREFIX,
.list = ocfs2_xattr_user_list, .list = ocfs2_xattr_user_list,
.get = ocfs2_xattr_user_get, .get = ocfs2_xattr_user_get,
......
...@@ -37,12 +37,12 @@ struct ocfs2_security_xattr_info { ...@@ -37,12 +37,12 @@ struct ocfs2_security_xattr_info {
size_t value_len; size_t value_len;
}; };
extern struct xattr_handler ocfs2_xattr_user_handler; extern const struct xattr_handler ocfs2_xattr_user_handler;
extern struct xattr_handler ocfs2_xattr_trusted_handler; extern const struct xattr_handler ocfs2_xattr_trusted_handler;
extern struct xattr_handler ocfs2_xattr_security_handler; extern const struct xattr_handler ocfs2_xattr_security_handler;
extern struct xattr_handler ocfs2_xattr_acl_access_handler; extern const struct xattr_handler ocfs2_xattr_acl_access_handler;
extern struct xattr_handler ocfs2_xattr_acl_default_handler; extern const struct xattr_handler ocfs2_xattr_acl_default_handler;
extern struct xattr_handler *ocfs2_xattr_handlers[]; extern const struct xattr_handler *ocfs2_xattr_handlers[];
ssize_t ocfs2_listxattr(struct dentry *, char *, size_t); ssize_t ocfs2_listxattr(struct dentry *, char *, size_t);
int ocfs2_xattr_get_nolock(struct inode *, struct buffer_head *, int, int ocfs2_xattr_get_nolock(struct inode *, struct buffer_head *, int,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment