ext4l: Add stubs for xattr functions used by ialloc.c

Add stub declarations and implementations for xattr functions that
ialloc.c calls but which are defined in xattr.c (not yet compiled):
- __ext4_xattr_set_credits
- ext4_init_security

Add declarations to ext4_uboot.h and implementations to stub.c.

Co-developed-by: Claude Opus 4.5 <noreply@anthropic.com>
Signed-off-by: Simon Glass <simon.glass@canonical.com>
This commit is contained in:
Simon Glass
2025-12-17 19:41:28 -07:00
parent 390a94ee47
commit c29defa81d
2 changed files with 26 additions and 2 deletions

View File

@@ -366,9 +366,15 @@ extern struct user_namespace init_user_ns;
#ifndef _FS_EXT4_ACL_H
#define ext4_init_acl(h, i, d) ({ (void)(h); (void)(i); (void)(d); 0; })
#endif
/* Note: ext4_init_security is already handled in xattr.h */
/* xattr stubs for files that don't include xattr.h */
struct super_block;
struct buffer_head;
struct qstr;
/* xattr stubs - __ext4_xattr_set_credits is declared in xattr.h */
int __ext4_xattr_set_credits(struct super_block *sb, struct inode *inode,
struct buffer_head *block_bh, size_t value_len,
bool is_create);
/* ext4_init_security is declared in xattr.h */
/* inode state stubs */
#define is_bad_inode(inode) (0)

View File

@@ -377,3 +377,21 @@ struct buffer_head *ext4_sb_bread_nofail(struct super_block *sb,
{
return NULL;
}
/*
* Stubs for ialloc.c - xattr functions
*/
int __ext4_xattr_set_credits(struct super_block *sb, struct inode *inode,
struct buffer_head *block_bh, size_t value_len,
bool is_create)
{
return 0;
}
struct qstr;
int ext4_init_security(void *handle, struct inode *inode, struct inode *dir,
const struct qstr *qstr)
{
return 0;
}