diff options
| author | Sheng Yong <shengyong1@huawei.com> | 2017-06-26 10:41:35 +0800 |
|---|---|---|
| committer | Moyster <oysterized@gmail.com> | 2017-07-21 12:38:11 +0200 |
| commit | d2c2bd2d940373e5ef81a1c0588323d779cfe0ef (patch) | |
| tree | 6bd47d51f10df9afd3757c5c126c71b4cae62138 | |
| parent | 558bca0c7d5575b5e2e3adbf2feac82e145f6041 (diff) | |
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 <shengyong1@huawei.com>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
| -rw-r--r-- | fs/f2fs/dir.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/fs/f2fs/dir.c b/fs/f2fs/dir.c index 7c7699597..d41c5a4c7 100644 --- a/fs/f2fs/dir.c +++ b/fs/f2fs/dir.c @@ -416,7 +416,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. |
