Merge remote-tracking branch 'spi/fix/core' into spi-linus
[firefly-linux-kernel-4.4.55.git] / fs / ext2 / inode.c
index c260de6d7b6df9e5350ecfc019f41ed6def75470..94ed36849b717bb83d3824527b9ae4f2f7d4b90a 100644 (file)
@@ -632,6 +632,8 @@ static int ext2_get_blocks(struct inode *inode,
        int count = 0;
        ext2_fsblk_t first_block = 0;
 
+       BUG_ON(maxblocks == 0);
+
        depth = ext2_block_to_path(inode,iblock,offsets,&blocks_to_boundary);
 
        if (depth == 0)
@@ -1564,7 +1566,7 @@ int ext2_setattr(struct dentry *dentry, struct iattr *iattr)
        }
        setattr_copy(inode, iattr);
        if (iattr->ia_valid & ATTR_MODE)
-               error = ext2_acl_chmod(inode);
+               error = posix_acl_chmod(inode, inode->i_mode);
        mark_inode_dirty(inode);
 
        return error;