diff options
Diffstat (limited to 'fs/f2fs')
-rw-r--r-- | fs/f2fs/dir.c | 8 | ||||
-rw-r--r-- | fs/f2fs/namei.c | 6 |
2 files changed, 7 insertions, 7 deletions
diff --git a/fs/f2fs/dir.c b/fs/f2fs/dir.c index b278bfbc364..67e2d1361fa 100644 --- a/fs/f2fs/dir.c +++ b/fs/f2fs/dir.c @@ -346,8 +346,14 @@ static struct page *init_inode_metadata(struct inode *inode, init_dent_inode(name, page); - if (is_inode_flag_set(F2FS_I(inode), FI_INC_LINK)) + /* + * This file should be checkpointed during fsync. + * We lost i_pino from now on. + */ + if (is_inode_flag_set(F2FS_I(inode), FI_INC_LINK)) { + set_cp_file(inode); inc_nlink(inode); + } return page; error: diff --git a/fs/f2fs/namei.c b/fs/f2fs/namei.c index efe0a127cb7..1fe150276fa 100644 --- a/fs/f2fs/namei.c +++ b/fs/f2fs/namei.c @@ -181,12 +181,6 @@ static int f2fs_link(struct dentry *old_dentry, struct inode *dir, if (err) goto out; - /* - * This file should be checkpointed during fsync. - * We lost i_pino from now on. - */ - set_cp_file(inode); - d_instantiate(dentry, inode); return 0; out: |