Re: [PATCH v2] f2fs: don't leave the hashed inode while it's unlinked
From: Wenjie Qi
Date: Sun Aug 23 2026 - 05:57:04 EST
Hi Jaegeuk,
It looks like the original symlink construction error is lost here:
err = __do_unlink(dir, inode, &dentry->d_name);
If fscrypt_encrypt_symlink() or page_symlink() fails but __do_unlink()
succeeds, err becomes zero. f2fs_handle_failed_inode() then releases the
inode, and f2fs_symlink() returns success even though the directory entry
has been removed.
Is this intended? Should the rollback result be stored separately, for
example in ret, while preserving the original construction error in err?
There seems to be a similar issue in the give_up path. If rollback fails
in a DIRSYNC directory, a successful f2fs_sync_fs() can overwrite the
existing error with zero.
Regards,
Wenjie