fs: xattr_handler table should be const
The entries in xattr handler table should be immutable (ie const) like other operation tables. Later patches convert common filesystems. Uncoverted filesystems will still work, but will generate a compiler warning. Signed-off-by: Stephen Hemminger <shemminger@vyatta.com> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
This commit is contained in:
committed by
Al Viro
parent
18e9e5104f
commit
bb4354538e
@@ -1336,7 +1336,7 @@ struct super_block {
|
||||
#ifdef CONFIG_SECURITY
|
||||
void *s_security;
|
||||
#endif
|
||||
struct xattr_handler **s_xattr;
|
||||
const struct xattr_handler **s_xattr;
|
||||
|
||||
struct list_head s_inodes; /* all inodes */
|
||||
struct hlist_head s_anon; /* anonymous dentries for (nfs) exporting */
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
|
||||
struct inode;
|
||||
|
||||
extern struct xattr_handler generic_acl_access_handler;
|
||||
extern struct xattr_handler generic_acl_default_handler;
|
||||
extern const struct xattr_handler generic_acl_access_handler;
|
||||
extern const struct xattr_handler generic_acl_default_handler;
|
||||
|
||||
int generic_acl_init(struct inode *, struct inode *);
|
||||
int generic_acl_chmod(struct inode *);
|
||||
|
||||
@@ -37,7 +37,7 @@ struct inode;
|
||||
struct dentry;
|
||||
|
||||
struct xattr_handler {
|
||||
char *prefix;
|
||||
const char *prefix;
|
||||
int flags; /* fs private flags passed back to the handlers */
|
||||
size_t (*list)(struct dentry *dentry, char *list, size_t list_size,
|
||||
const char *name, size_t name_len, int handler_flags);
|
||||
|
||||
Reference in New Issue
Block a user