]> www.infradead.org Git - users/willy/xarray.git/commitdiff
f2fs: do not set LOST_PINO for newly created dir
authorSheng Yong <shengyong1@huawei.com>
Mon, 26 Jun 2017 02:41:35 +0000 (10:41 +0800)
committerJaegeuk Kim <jaegeuk@kernel.org>
Fri, 7 Jul 2017 17:34:45 +0000 (10:34 -0700)
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>
fs/f2fs/dir.c

index 94756f55a97e7d86052cdb49ce79fcc131738cfd..37f9c7f556058fcda91b15b411acfeebdf48824d 100644 (file)
@@ -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.