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 cfc8dc6f6f
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
This commit is contained in:
@@ -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;
|
||||
|
Reference in New Issue
Block a user