]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph-client.git/commit
ext4: do not check fast symlink during orphan recovery
authorZhang Yi <yi.zhang@huawei.com>
Sat, 31 Jan 2026 09:11:56 +0000 (17:11 +0800)
committerTheodore Ts'o <tytso@mit.edu>
Sat, 28 Mar 2026 03:14:25 +0000 (23:14 -0400)
commit84e21e3fb8fd99ea460eb7274584750d11cf3e9f
treeecd846d32697c6a0fb6b1ac1766619385b9b9295
parent82c4f23d2757c2fc6751a5805c1feecdd4c430fb
ext4: do not check fast symlink during orphan recovery

Commit '5f920d5d6083 ("ext4: verify fast symlink length")' causes the
generic/475 test to fail during orphan cleanup of zero-length symlinks.

  generic/475  84s ... _check_generic_filesystem: filesystem on /dev/vde is inconsistent

The fsck reports are provided below:

  Deleted inode 9686 has zero dtime.
  Deleted inode 158230 has zero dtime.
  ...
  Inode bitmap differences:  -9686 -158230
  Orphan file (inode 12) block 13 is not clean.
  Failed to initialize orphan file.

In ext4_symlink(), a newly created symlink can be added to the orphan
list due to ENOSPC. Its data has not been initialized, and its size is
zero. Therefore, we need to disregard the length check of the symbolic
link when cleaning up orphan inodes. Instead, we should ensure that the
nlink count is zero.

Fixes: 5f920d5d6083 ("ext4: verify fast symlink length")
Signed-off-by: Zhang Yi <yi.zhang@huawei.com>
Reviewed-by: Jan Kara <jack@suse.cz>
Link: https://patch.msgid.link/20260131091156.1733648-1-yi.zhang@huaweicloud.com
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Cc: stable@kernel.org
fs/ext4/inode.c