Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 197955
b: refs/heads/master
c: bb43545
h: refs/heads/master
i:
  197953: 2109045
  197951: 7b399f4
v: v3
  • Loading branch information
Stephen Hemminger authored and Al Viro committed May 21, 2010
1 parent 72d5efb commit c48ee1e
Show file tree
Hide file tree
Showing 7 changed files with 16 additions and 16 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 18e9e5104fcd9a973ffe3eed3816c87f2a1b6cd2
refs/heads/master: bb4354538eb7b92f32cfedbad68c7be266c0b467
4 changes: 2 additions & 2 deletions trunk/fs/generic_acl.c
Original file line number Diff line number Diff line change
Expand Up @@ -201,15 +201,15 @@ generic_check_acl(struct inode *inode, int mask)
return -EAGAIN;
}

struct xattr_handler generic_acl_access_handler = {
const struct xattr_handler generic_acl_access_handler = {
.prefix = POSIX_ACL_XATTR_ACCESS,
.flags = ACL_TYPE_ACCESS,
.list = generic_acl_list,
.get = generic_acl_get,
.set = generic_acl_set,
};

struct xattr_handler generic_acl_default_handler = {
const struct xattr_handler generic_acl_default_handler = {
.prefix = POSIX_ACL_XATTR_DEFAULT,
.flags = ACL_TYPE_DEFAULT,
.list = generic_acl_list,
Expand Down
14 changes: 7 additions & 7 deletions trunk/fs/xattr.c
Original file line number Diff line number Diff line change
Expand Up @@ -590,10 +590,10 @@ strcmp_prefix(const char *a, const char *a_prefix)
/*
* Find the xattr_handler with the matching prefix.
*/
static struct xattr_handler *
xattr_resolve_name(struct xattr_handler **handlers, const char **name)
static const struct xattr_handler *
xattr_resolve_name(const struct xattr_handler **handlers, const char **name)
{
struct xattr_handler *handler;
const struct xattr_handler *handler;

if (!*name)
return NULL;
Expand All @@ -614,7 +614,7 @@ xattr_resolve_name(struct xattr_handler **handlers, const char **name)
ssize_t
generic_getxattr(struct dentry *dentry, const char *name, void *buffer, size_t size)
{
struct xattr_handler *handler;
const struct xattr_handler *handler;

handler = xattr_resolve_name(dentry->d_sb->s_xattr, &name);
if (!handler)
Expand All @@ -629,7 +629,7 @@ generic_getxattr(struct dentry *dentry, const char *name, void *buffer, size_t s
ssize_t
generic_listxattr(struct dentry *dentry, char *buffer, size_t buffer_size)
{
struct xattr_handler *handler, **handlers = dentry->d_sb->s_xattr;
const struct xattr_handler *handler, **handlers = dentry->d_sb->s_xattr;
unsigned int size = 0;

if (!buffer) {
Expand Down Expand Up @@ -659,7 +659,7 @@ generic_listxattr(struct dentry *dentry, char *buffer, size_t buffer_size)
int
generic_setxattr(struct dentry *dentry, const char *name, const void *value, size_t size, int flags)
{
struct xattr_handler *handler;
const struct xattr_handler *handler;

if (size == 0)
value = ""; /* empty EA, do not remove */
Expand All @@ -676,7 +676,7 @@ generic_setxattr(struct dentry *dentry, const char *name, const void *value, siz
int
generic_removexattr(struct dentry *dentry, const char *name)
{
struct xattr_handler *handler;
const struct xattr_handler *handler;

handler = xattr_resolve_name(dentry->d_sb->s_xattr, &name);
if (!handler)
Expand Down
2 changes: 1 addition & 1 deletion trunk/include/linux/fs.h
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
Expand Down
4 changes: 2 additions & 2 deletions trunk/include/linux/generic_acl.h
Original file line number Diff line number Diff line change
Expand Up @@ -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 *);
Expand Down
2 changes: 1 addition & 1 deletion trunk/include/linux/xattr.h
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
4 changes: 2 additions & 2 deletions trunk/mm/shmem.c
Original file line number Diff line number Diff line change
Expand Up @@ -2071,14 +2071,14 @@ static int shmem_xattr_security_set(struct dentry *dentry, const char *name,
size, flags);
}

static struct xattr_handler shmem_xattr_security_handler = {
static const struct xattr_handler shmem_xattr_security_handler = {
.prefix = XATTR_SECURITY_PREFIX,
.list = shmem_xattr_security_list,
.get = shmem_xattr_security_get,
.set = shmem_xattr_security_set,
};

static struct xattr_handler *shmem_xattr_handlers[] = {
static const struct xattr_handler *shmem_xattr_handlers[] = {
&generic_acl_access_handler,
&generic_acl_default_handler,
&shmem_xattr_security_handler,
Expand Down

0 comments on commit c48ee1e

Please sign in to comment.