From 9d1015dd4c6ba602272f80487bb9c922a9a71cc1 Mon Sep 17 00:00:00 2001 From: Jaegeuk Kim Date: Fri, 5 Dec 2014 10:51:50 -0800 Subject: f2fs: count inline_xx in do_read_inode In do_read_inode, if we failed __recover_inline_status, the inode has inline flag without increasing its count. Later, f2fs_evict_inode will decrease the count, which causes -1. Signed-off-by: Jaegeuk Kim --- fs/f2fs/inode.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/fs/f2fs/inode.c b/fs/f2fs/inode.c index 9fe110ef8cc4..196cc7843aaf 100644 --- a/fs/f2fs/inode.c +++ b/fs/f2fs/inode.c @@ -148,6 +148,10 @@ static int do_read_inode(struct inode *inode) __get_inode_rdev(inode, ri); f2fs_put_page(node_page, 1); + + stat_inc_inline_inode(inode); + stat_inc_inline_dir(inode); + return err; } @@ -199,8 +203,6 @@ make_now: goto bad_inode; } unlock_new_inode(inode); - stat_inc_inline_inode(inode); - stat_inc_inline_dir(inode); trace_f2fs_iget(inode); return inode; -- cgit v1.2.2