Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

jffs2: constify xattr_handler

Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>

authored by

Stephen Hemminger and committed by
Al Viro
365f0cb9 46e58764

+15 -15
+2 -2
fs/jffs2/acl.c
··· 419 419 return rc; 420 420 } 421 421 422 - struct xattr_handler jffs2_acl_access_xattr_handler = { 422 + const struct xattr_handler jffs2_acl_access_xattr_handler = { 423 423 .prefix = POSIX_ACL_XATTR_ACCESS, 424 424 .flags = ACL_TYPE_DEFAULT, 425 425 .list = jffs2_acl_access_listxattr, ··· 427 427 .set = jffs2_acl_setxattr, 428 428 }; 429 429 430 - struct xattr_handler jffs2_acl_default_xattr_handler = { 430 + const struct xattr_handler jffs2_acl_default_xattr_handler = { 431 431 .prefix = POSIX_ACL_XATTR_DEFAULT, 432 432 .flags = ACL_TYPE_DEFAULT, 433 433 .list = jffs2_acl_default_listxattr,
+2 -2
fs/jffs2/acl.h
··· 31 31 extern int jffs2_init_acl_pre(struct inode *, struct inode *, int *); 32 32 extern int jffs2_init_acl_post(struct inode *); 33 33 34 - extern struct xattr_handler jffs2_acl_access_xattr_handler; 35 - extern struct xattr_handler jffs2_acl_default_xattr_handler; 34 + extern const struct xattr_handler jffs2_acl_access_xattr_handler; 35 + extern const struct xattr_handler jffs2_acl_default_xattr_handler; 36 36 37 37 #else 38 38
+1 -1
fs/jffs2/security.c
··· 77 77 return retlen; 78 78 } 79 79 80 - struct xattr_handler jffs2_security_xattr_handler = { 80 + const struct xattr_handler jffs2_security_xattr_handler = { 81 81 .prefix = XATTR_SECURITY_PREFIX, 82 82 .list = jffs2_security_listxattr, 83 83 .set = jffs2_security_setxattr,
+4 -4
fs/jffs2/xattr.c
··· 904 904 * do_jffs2_setxattr(inode, xprefix, xname, buffer, size, flags) 905 905 * is an implementation of setxattr handler on jffs2. 906 906 * -------------------------------------------------- */ 907 - struct xattr_handler *jffs2_xattr_handlers[] = { 907 + const struct xattr_handler *jffs2_xattr_handlers[] = { 908 908 &jffs2_user_xattr_handler, 909 909 #ifdef CONFIG_JFFS2_FS_SECURITY 910 910 &jffs2_security_xattr_handler, ··· 917 917 NULL 918 918 }; 919 919 920 - static struct xattr_handler *xprefix_to_handler(int xprefix) { 921 - struct xattr_handler *ret; 920 + static const struct xattr_handler *xprefix_to_handler(int xprefix) { 921 + const struct xattr_handler *ret; 922 922 923 923 switch (xprefix) { 924 924 case JFFS2_XPREFIX_USER: ··· 955 955 struct jffs2_inode_cache *ic = f->inocache; 956 956 struct jffs2_xattr_ref *ref, **pref; 957 957 struct jffs2_xattr_datum *xd; 958 - struct xattr_handler *xhandle; 958 + const struct xattr_handler *xhandle; 959 959 ssize_t len, rc; 960 960 int retry = 0; 961 961
+4 -4
fs/jffs2/xattr.h
··· 93 93 extern int do_jffs2_setxattr(struct inode *inode, int xprefix, const char *xname, 94 94 const char *buffer, size_t size, int flags); 95 95 96 - extern struct xattr_handler *jffs2_xattr_handlers[]; 97 - extern struct xattr_handler jffs2_user_xattr_handler; 98 - extern struct xattr_handler jffs2_trusted_xattr_handler; 96 + extern const struct xattr_handler *jffs2_xattr_handlers[]; 97 + extern const struct xattr_handler jffs2_user_xattr_handler; 98 + extern const struct xattr_handler jffs2_trusted_xattr_handler; 99 99 100 100 extern ssize_t jffs2_listxattr(struct dentry *, char *, size_t); 101 101 #define jffs2_getxattr generic_getxattr ··· 122 122 123 123 #ifdef CONFIG_JFFS2_FS_SECURITY 124 124 extern int jffs2_init_security(struct inode *inode, struct inode *dir); 125 - extern struct xattr_handler jffs2_security_xattr_handler; 125 + extern const struct xattr_handler jffs2_security_xattr_handler; 126 126 #else 127 127 #define jffs2_init_security(inode,dir) (0) 128 128 #endif /* CONFIG_JFFS2_FS_SECURITY */
+1 -1
fs/jffs2/xattr_trusted.c
··· 47 47 return retlen; 48 48 } 49 49 50 - struct xattr_handler jffs2_trusted_xattr_handler = { 50 + const struct xattr_handler jffs2_trusted_xattr_handler = { 51 51 .prefix = XATTR_TRUSTED_PREFIX, 52 52 .list = jffs2_trusted_listxattr, 53 53 .set = jffs2_trusted_setxattr,
+1 -1
fs/jffs2/xattr_user.c
··· 47 47 return retlen; 48 48 } 49 49 50 - struct xattr_handler jffs2_user_xattr_handler = { 50 + const struct xattr_handler jffs2_user_xattr_handler = { 51 51 .prefix = XATTR_USER_PREFIX, 52 52 .list = jffs2_user_listxattr, 53 53 .set = jffs2_user_setxattr,