Skip to content

Commit

Permalink
f2fs: do not set LOST_PINO for newly created dir
Browse files Browse the repository at this point in the history
Since directories will be written back with checkpoint and fsync a
directory will always write CP, there is no need to set LOST_PINO
after creating a directory.

Signed-off-by: Sheng Yong <shengyong1@huawei.com>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
  • Loading branch information
Sheng Yong authored and Jaegeuk Kim committed Jul 7, 2017
1 parent 0771fcc commit d58dfb7
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion fs/f2fs/dir.c
Original file line number Diff line number Diff line change
Expand Up @@ -415,7 +415,8 @@ struct page *init_inode_metadata(struct inode *inode, struct inode *dir,
* We lost i_pino from now on.
*/
if (is_inode_flag_set(inode, FI_INC_LINK)) {
file_lost_pino(inode);
if (!S_ISDIR(inode->i_mode))
file_lost_pino(inode);
/*
* If link the tmpfile to alias through linkat path,
* we should remove this inode from orphan list.
Expand Down

0 comments on commit d58dfb7

Please sign in to comment.