Re: [PATCH] f2fs: Create COW inode from parent dentry for atomic write

From: Chao Yu
Date: Tue Aug 13 2024 - 23:46:41 EST


On 2024/8/13 15:32, Yeongjin Gil wrote:
The i_pino in f2fs_inode_info has the previous parent's i_ino when inode
was renamed, which may cause f2fs_ioc_start_atomic_write to fail.
If file_wrong_pino is true and i_nlink is 1, then to find a valid pino,
we should refer to the dentry from inode.

To resolve this issue, let's get parent inode using parent dentry
directly.

Fixes: 3db1de0e582c ("f2fs: change the current atomic write way")
Reviewed-by: Sungjong Seo <sj1557.seo@xxxxxxxxxxx>
Reviewed-by: Sunmin Jeong <s_min.jeong@xxxxxxxxxxx>
Signed-off-by: Yeongjin Gil <youngjin.gil@xxxxxxxxxxx>

Reviewed-by: Chao Yu <chao@xxxxxxxxxx>

Thanks,