aboutsummaryrefslogtreecommitdiff
path: root/fs/jffs2/acl.c
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2011-07-23 18:18:58 -0400
committerAl Viro <viro@zeniv.linux.org.uk>2011-07-24 10:12:01 -0400
commit963945bf93e46b9bf71a07bf9c78183e0f57733a (patch)
tree736c84e9a31b2dd736293ca117688527e3a5a194 /fs/jffs2/acl.c
parent1ec95bf34d976b38897d1977b155a544d77b05e7 (diff)
fix jffs2 ACLs on big-endian with 16bit mode_t
casting int * to mode_t * is not a good thing - on a *lot* of big-endian architectures mode_t happens to be smaller than int and there it breaks quite spectaculary... Fucked-up-by: commit cfc8dc6f6f69ede939e09c2af06a01adee577285 Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs/jffs2/acl.c')
-rw-r--r--fs/jffs2/acl.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/jffs2/acl.c b/fs/jffs2/acl.c
index 3675b3cdee8..f9c302430aa 100644
--- a/fs/jffs2/acl.c
+++ b/fs/jffs2/acl.c
@@ -278,7 +278,7 @@ int jffs2_check_acl(struct inode *inode, int mask)
return -EAGAIN;
}
-int jffs2_init_acl_pre(struct inode *dir_i, struct inode *inode, int *i_mode)
+int jffs2_init_acl_pre(struct inode *dir_i, struct inode *inode, mode_t *i_mode)
{
struct posix_acl *acl, *clone;
int rc;
@@ -301,7 +301,7 @@ int jffs2_init_acl_pre(struct inode *dir_i, struct inode *inode, int *i_mode)
clone = posix_acl_clone(acl, GFP_KERNEL);
if (!clone)
return -ENOMEM;
- rc = posix_acl_create_masq(clone, (mode_t *)i_mode);
+ rc = posix_acl_create_masq(clone, i_mode);
if (rc < 0) {
posix_acl_release(clone);
return rc;