Commit 94d09a98cdb163be12fb5c76841fa295f0bee22a
Committed by
Al Viro
1 parent
11e2752807
reiserfs: constify xattr_handler
Signed-off-by: Stephen Hemminger <shemminger@vyatta.com> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Showing 7 changed files with 18 additions and 18 deletions Side-by-side Diff
fs/reiserfs/xattr.c
... | ... | @@ -723,11 +723,11 @@ |
723 | 723 | (handler) = *(handlers)++) |
724 | 724 | |
725 | 725 | /* This is the implementation for the xattr plugin infrastructure */ |
726 | -static inline struct xattr_handler * | |
727 | -find_xattr_handler_prefix(struct xattr_handler **handlers, | |
726 | +static inline const struct xattr_handler * | |
727 | +find_xattr_handler_prefix(const struct xattr_handler **handlers, | |
728 | 728 | const char *name) |
729 | 729 | { |
730 | - struct xattr_handler *xah; | |
730 | + const struct xattr_handler *xah; | |
731 | 731 | |
732 | 732 | if (!handlers) |
733 | 733 | return NULL; |
... | ... | @@ -748,7 +748,7 @@ |
748 | 748 | reiserfs_getxattr(struct dentry * dentry, const char *name, void *buffer, |
749 | 749 | size_t size) |
750 | 750 | { |
751 | - struct xattr_handler *handler; | |
751 | + const struct xattr_handler *handler; | |
752 | 752 | |
753 | 753 | handler = find_xattr_handler_prefix(dentry->d_sb->s_xattr, name); |
754 | 754 | |
... | ... | @@ -767,7 +767,7 @@ |
767 | 767 | reiserfs_setxattr(struct dentry *dentry, const char *name, const void *value, |
768 | 768 | size_t size, int flags) |
769 | 769 | { |
770 | - struct xattr_handler *handler; | |
770 | + const struct xattr_handler *handler; | |
771 | 771 | |
772 | 772 | handler = find_xattr_handler_prefix(dentry->d_sb->s_xattr, name); |
773 | 773 | |
... | ... | @@ -784,7 +784,7 @@ |
784 | 784 | */ |
785 | 785 | int reiserfs_removexattr(struct dentry *dentry, const char *name) |
786 | 786 | { |
787 | - struct xattr_handler *handler; | |
787 | + const struct xattr_handler *handler; | |
788 | 788 | handler = find_xattr_handler_prefix(dentry->d_sb->s_xattr, name); |
789 | 789 | |
790 | 790 | if (!handler || get_inode_sd_version(dentry->d_inode) == STAT_DATA_V1) |
... | ... | @@ -807,7 +807,7 @@ |
807 | 807 | size_t size; |
808 | 808 | if (name[0] != '.' || |
809 | 809 | (namelen != 1 && (name[1] != '.' || namelen != 2))) { |
810 | - struct xattr_handler *handler; | |
810 | + const struct xattr_handler *handler; | |
811 | 811 | handler = find_xattr_handler_prefix(b->dentry->d_sb->s_xattr, |
812 | 812 | name); |
813 | 813 | if (!handler) /* Unsupported xattr name */ |
... | ... | @@ -920,7 +920,7 @@ |
920 | 920 | #endif |
921 | 921 | |
922 | 922 | /* Actual operations that are exported to VFS-land */ |
923 | -struct xattr_handler *reiserfs_xattr_handlers[] = { | |
923 | +const struct xattr_handler *reiserfs_xattr_handlers[] = { | |
924 | 924 | #ifdef CONFIG_REISERFS_FS_XATTR |
925 | 925 | &reiserfs_xattr_user_handler, |
926 | 926 | &reiserfs_xattr_trusted_handler, |
fs/reiserfs/xattr_acl.c
... | ... | @@ -500,7 +500,7 @@ |
500 | 500 | return size; |
501 | 501 | } |
502 | 502 | |
503 | -struct xattr_handler reiserfs_posix_acl_access_handler = { | |
503 | +const struct xattr_handler reiserfs_posix_acl_access_handler = { | |
504 | 504 | .prefix = POSIX_ACL_XATTR_ACCESS, |
505 | 505 | .flags = ACL_TYPE_ACCESS, |
506 | 506 | .get = posix_acl_get, |
... | ... | @@ -520,7 +520,7 @@ |
520 | 520 | return size; |
521 | 521 | } |
522 | 522 | |
523 | -struct xattr_handler reiserfs_posix_acl_default_handler = { | |
523 | +const struct xattr_handler reiserfs_posix_acl_default_handler = { | |
524 | 524 | .prefix = POSIX_ACL_XATTR_DEFAULT, |
525 | 525 | .flags = ACL_TYPE_DEFAULT, |
526 | 526 | .get = posix_acl_get, |
fs/reiserfs/xattr_security.c
... | ... | @@ -111,7 +111,7 @@ |
111 | 111 | sec->value = NULL; |
112 | 112 | } |
113 | 113 | |
114 | -struct xattr_handler reiserfs_xattr_security_handler = { | |
114 | +const struct xattr_handler reiserfs_xattr_security_handler = { | |
115 | 115 | .prefix = XATTR_SECURITY_PREFIX, |
116 | 116 | .get = security_get, |
117 | 117 | .set = security_set, |
fs/reiserfs/xattr_trusted.c
fs/reiserfs/xattr_user.c
include/linux/reiserfs_acl.h
... | ... | @@ -53,8 +53,8 @@ |
53 | 53 | struct inode *dir, struct dentry *dentry, |
54 | 54 | struct inode *inode); |
55 | 55 | int reiserfs_cache_default_acl(struct inode *dir); |
56 | -extern struct xattr_handler reiserfs_posix_acl_default_handler; | |
57 | -extern struct xattr_handler reiserfs_posix_acl_access_handler; | |
56 | +extern const struct xattr_handler reiserfs_posix_acl_default_handler; | |
57 | +extern const struct xattr_handler reiserfs_posix_acl_access_handler; | |
58 | 58 | |
59 | 59 | #else |
60 | 60 |
include/linux/reiserfs_xattr.h
... | ... | @@ -58,9 +58,9 @@ |
58 | 58 | struct inode *, const char *, const void *, |
59 | 59 | size_t, int); |
60 | 60 | |
61 | -extern struct xattr_handler reiserfs_xattr_user_handler; | |
62 | -extern struct xattr_handler reiserfs_xattr_trusted_handler; | |
63 | -extern struct xattr_handler reiserfs_xattr_security_handler; | |
61 | +extern const struct xattr_handler reiserfs_xattr_user_handler; | |
62 | +extern const struct xattr_handler reiserfs_xattr_trusted_handler; | |
63 | +extern const struct xattr_handler reiserfs_xattr_security_handler; | |
64 | 64 | #ifdef CONFIG_REISERFS_FS_SECURITY |
65 | 65 | int reiserfs_security_init(struct inode *dir, struct inode *inode, |
66 | 66 | struct reiserfs_security_handle *sec); |