ANDROID: ODROID-C5: aml_erofs: Avoid symbol fix.

- generic_ro_fops, posix_acl_access_xattr_handler and
  posix_acl_default_xattr_handler.

Change-Id: I556303d05d3f0b1058d5d2023084a8006875df78
Signed-off-by: xiane <sangch.go@gmail.com>
This commit is contained in:
xiane
2024-10-14 12:53:20 +09:00
committed by codewalkerster
parent 65d8299701
commit 4baa975840
6 changed files with 19 additions and 27 deletions
+1 -1
View File
@@ -272,7 +272,7 @@ static int erofs_fill_inode(struct inode *inode, int isdir)
case S_IFREG:
inode->i_op = &erofs_generic_iops;
if (erofs_inode_is_data_compressed(vi->datalayout)) {
inode->i_fop = generic_ro_fops_t;
inode->i_fop = &generic_ro_fops;
} else {
#ifdef CONFIG_FS_DAX
erofs_file_fops.mmap = erofs_file_mmap;
-4
View File
@@ -607,10 +607,6 @@ typedef const char *(*simple_get_link_t)(struct dentry *dentry, struct inode *in
typedef int (*fs_param_is_enum_t)(struct p_log *log, const struct fs_parameter_spec *p,
struct fs_parameter *param, struct fs_parse_result *result);
extern struct file_operations *generic_ro_fops_t;
extern struct xattr_handler *posix_acl_default_xattr_handler_t;
extern struct xattr_handler *posix_acl_access_xattr_handler_t;
extern __xa_cmpxchg_t f___xa_cmpxchg;
extern fs_ftype_to_dtype_t f_fs_ftype_to_dtype;
extern filemap_read_t f_filemap_read;
-4
View File
@@ -702,10 +702,6 @@ static int erofs_fc_fill_super(struct super_block *sb, struct fs_context *fc)
sb->s_time_gran = 1;
sb->s_op = &erofs_sops;
#if CONFIG_AMLOGIC_EROFS_POSIX_ACL
erofs_xattr_handlers[1] = posix_acl_access_xattr_handler_t;
erofs_xattr_handlers[2] = posix_acl_default_xattr_handler_t;
#endif
sb->s_xattr = (const struct xattr_handler **)erofs_xattr_handlers;
if (test_opt(&sbi->opt, POSIX_ACL))
-3
View File
@@ -384,9 +384,6 @@ static struct ksymbol module_symbols[] = {
KSYM_FUN(LZ4_decompress_safe),
KSYM_FUN(LZ4_decompress_safe_partial),
KSYM_FUN(out_of_line_wait_on_bit_lock),
KSYM_OBJ(generic_ro_fops),
KSYM_OBJ(posix_acl_default_xattr_handler),
KSYM_OBJ(posix_acl_access_xattr_handler),
{ /*
* compiler always say symbol undefined if use KSYM_FUN macro
* seems compiler have bug.
+7 -6
View File
@@ -5,6 +5,7 @@
*/
#include <linux/security.h>
#include "xattr.h"
#include <linux/posix_acl_xattr.h>
struct xattr_iter {
struct super_block *sb;
@@ -490,14 +491,14 @@ static int erofs_xattr_generic_get(const struct xattr_handler *handler,
return erofs_getxattr(inode, handler->flags, name, buffer, size);
}
struct xattr_handler erofs_xattr_user_handler = {
const struct xattr_handler erofs_xattr_user_handler = {
.prefix = XATTR_USER_PREFIX,
.flags = EROFS_XATTR_INDEX_USER,
.list = erofs_xattr_user_list,
.get = erofs_xattr_generic_get,
};
struct xattr_handler erofs_xattr_trusted_handler = {
const struct xattr_handler erofs_xattr_trusted_handler = {
.prefix = XATTR_TRUSTED_PREFIX,
.flags = EROFS_XATTR_INDEX_TRUSTED,
.list = erofs_xattr_trusted_list,
@@ -505,18 +506,18 @@ struct xattr_handler erofs_xattr_trusted_handler = {
};
#ifdef CONFIG_AMLOGIC_EROFS_SECURITY
struct xattr_handler __maybe_unused erofs_xattr_security_handler = {
const struct xattr_handler __maybe_unused erofs_xattr_security_handler = {
.prefix = XATTR_SECURITY_PREFIX,
.flags = EROFS_XATTR_INDEX_SECURITY,
.get = erofs_xattr_generic_get,
};
#endif
struct xattr_handler *erofs_xattr_handlers[] = {
const struct xattr_handler *erofs_xattr_handlers[] = {
&erofs_xattr_user_handler,
#ifdef CONFIG_AMLOGIC_EROFS_POSIX_ACL
NULL, //posix_acl_access_xattr_handler_t,
NULL, //posix_acl_default_xattr_handler_t,
&posix_acl_access_xattr_handler,
&posix_acl_default_xattr_handler,
#endif
&erofs_xattr_trusted_handler,
#ifdef CONFIG_AMLOGIC_EROFS_SECURITY
+11 -9
View File
@@ -37,31 +37,33 @@ static inline unsigned int xattrblock_offset(struct erofs_sb_info *sbi,
}
#ifdef CONFIG_AMLOGIC_EROFS_XATTR
extern struct xattr_handler erofs_xattr_user_handler;
extern struct xattr_handler erofs_xattr_trusted_handler;
extern const struct xattr_handler erofs_xattr_user_handler;
extern const struct xattr_handler erofs_xattr_trusted_handler;
#ifdef CONFIG_AMLOGIC_EROFS_SECURITY
extern struct xattr_handler erofs_xattr_security_handler;
extern const struct xattr_handler erofs_xattr_security_handler;
#endif
static inline const struct xattr_handler *erofs_xattr_handler(unsigned int idx)
{
static struct xattr_handler *xattr_handler_map[] = {
static const struct xattr_handler *xattr_handler_map[] = {
[EROFS_XATTR_INDEX_USER] = &erofs_xattr_user_handler,
#ifdef CONFIG_AMLOGIC_EROFS_POSIX_ACL
[EROFS_XATTR_INDEX_POSIX_ACL_ACCESS] =
&posix_acl_access_xattr_handler,
[EROFS_XATTR_INDEX_POSIX_ACL_DEFAULT] =
&posix_acl_default_xattr_handler,
#endif
[EROFS_XATTR_INDEX_TRUSTED] = &erofs_xattr_trusted_handler,
#ifdef CONFIG_AMLOGIC_EROFS_SECURITY
[EROFS_XATTR_INDEX_SECURITY] = &erofs_xattr_security_handler,
#endif
};
#ifdef CONFIG_AMLOGIC_EROFS_POSIX_ACL
xattr_handler_map[EROFS_XATTR_INDEX_POSIX_ACL_ACCESS] = posix_acl_access_xattr_handler_t;
xattr_handler_map[EROFS_XATTR_INDEX_POSIX_ACL_DEFAULT] = posix_acl_default_xattr_handler_t;
#endif
return idx && idx < ARRAY_SIZE(xattr_handler_map) ?
xattr_handler_map[idx] : NULL;
}
extern struct xattr_handler *erofs_xattr_handlers[];
extern const struct xattr_handler *erofs_xattr_handlers[];
int erofs_getxattr(struct inode *, int, const char *, void *, size_t);
ssize_t erofs_listxattr(struct dentry *, char *, size_t);