From: Sheng Yong Date: Mon, 26 Jun 2017 02:41:35 +0000 (+0800) Subject: f2fs: do not set LOST_PINO for newly created dir X-Git-Tag: v4.13-rc1~66^2~7 X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=d58dfb75056c5f732a0b83c54d22c99b4edc947a;p=users%2Fwilly%2Fxarray.git f2fs: do not set LOST_PINO for newly created dir 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 Signed-off-by: Jaegeuk Kim --- diff --git a/fs/f2fs/dir.c b/fs/f2fs/dir.c index 94756f55a97e..37f9c7f55605 100644 --- a/fs/f2fs/dir.c +++ b/fs/f2fs/dir.c @@ -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.