mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-08-27 22:13:55 -04:00
ext4: fix spurious message about orphan cleanup on RO fs
When orphan_file feature is enabled, ext4_orphan_cleanup() was always
walking through the orphan file looking for orphan inodes. This is
mostly harmless but for read-only filesystem it results in spurious
"orphan cleanup on readonly fs" message and in other cornercases it
could result in similar somewhat misleading messages. Skip orphan
cleanup if the orphan file is empty to avoid confusing messages.
Fixes: 02f310fcf4 ("ext4: Speedup ext4 orphan inode handling")
Reported-by: Tigran Aivazian <aivazian.tigran@gmail.com>
Signed-off-by: Jan Kara <jack@suse.cz>
Reviewed-by: Baokun Li <libaokun@linux.alibaba.com>
Link: https://patch.msgid.link/20260803160037.64285-2-jack@suse.cz
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
This commit is contained in:
@@ -389,7 +389,7 @@ void ext4_orphan_cleanup(struct super_block *sb, struct ext4_super_block *es)
|
||||
struct ext4_orphan_info *oi = &EXT4_SB(sb)->s_orphan_info;
|
||||
int inodes_per_ob = ext4_inodes_per_orphan_block(sb);
|
||||
|
||||
if (!es->s_last_orphan && !oi->of_blocks) {
|
||||
if (!es->s_last_orphan && ext4_orphan_file_empty(sb)) {
|
||||
ext4_debug("no orphan inodes to clean up\n");
|
||||
return;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user