On 2017/6/26 10:41, Sheng Yong wrote:
> 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.

Needs to cover rename/rename2?

Thanks,

> 
> Signed-off-by: Sheng Yong <shengyo...@huawei.com>
> ---
>  fs/f2fs/dir.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> 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.
> 


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Linux-f2fs-devel mailing list
Linux-f2fs-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel

Reply via email to