Commit bc30e790 authored by Yeongjin Gil's avatar Yeongjin Gil Committed by Jaegeuk Kim
Browse files

BACKPORT: f2fs: Create COW inode from parent dentry for atomic write



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: 3db1de0e ("f2fs: change the current atomic write way")
Reviewed-by: default avatarSungjong Seo <sj1557.seo@samsung.com>
Reviewed-by: default avatarSunmin Jeong <s_min.jeong@samsung.com>
Signed-off-by: default avatarYeongjin Gil <youngjin.gil@samsung.com>
Reviewed-by: default avatarDaeho Jeong <daehojeong@google.com>
Reviewed-by: default avatarChao Yu <chao@kernel.org>
Signed-off-by: default avatarJaegeuk Kim <jaegeuk@kernel.org>

Bug: 369150601
Change-Id: I0d892ceb7523a03c33b9a00aa12e4c5e47212d58
(cherry picked from commit 8c1b7879)
Signed-off-by: default avatarDaeho Jeong <daehojeong@google.com>
parent 01032a9b
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment