linux: ext4l: Skip orphan handling in U-Boot

Skip orphan handling in U-Boot. We do synchronous journal commits
after each operation, so orphan recovery is not needed. Adding to
the orphan list without proper locking can corrupt the list.

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-30 09:56:42 -07:00
parent f0f85edc07
commit 1e8f07fe57

View File

@@ -103,6 +103,15 @@ int ext4_orphan_add(handle_t *handle, struct inode *inode)
int err = 0, rc; int err = 0, rc;
bool dirty = false; bool dirty = false;
#ifdef __UBOOT__
/*
* Skip orphan handling in U-Boot. We do synchronous journal commits
* after each operation, so orphan recovery is not needed. Adding to
* the orphan list without proper locking can corrupt the list.
*/
return 0;
#endif
if (!sbi->s_journal || is_bad_inode(inode)) if (!sbi->s_journal || is_bad_inode(inode))
return 0; return 0;