linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jaegeuk Kim <jaegeuk@kernel.org>
To: linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org,
	linux-f2fs-devel@lists.sourceforge.net
Cc: Jaegeuk Kim <jaegeuk@kernel.org>
Subject: [PATCH 06/11] f2fs: fix counting inline_data inode numbers
Date: Sun, 19 Oct 2014 22:19:34 -0700	[thread overview]
Message-ID: <1413782379-11758-6-git-send-email-jaegeuk@kernel.org> (raw)
In-Reply-To: <1413782379-11758-1-git-send-email-jaegeuk@kernel.org>

This patch fixes wrongly counting inline_data inode numbers.

Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
---
 fs/f2fs/inode.c | 4 ++--
 fs/f2fs/namei.c | 2 --
 2 files changed, 2 insertions(+), 4 deletions(-)

diff --git a/fs/f2fs/inode.c b/fs/f2fs/inode.c
index b9b1d6b..4131e3c 100644
--- a/fs/f2fs/inode.c
+++ b/fs/f2fs/inode.c
@@ -169,6 +169,7 @@ 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;
@@ -296,12 +297,12 @@ void f2fs_evict_inode(struct inode *inode)
 
 	f2fs_lock_op(sbi);
 	remove_inode_page(inode);
-	stat_dec_inline_inode(inode);
 	f2fs_unlock_op(sbi);
 
 	sb_end_intwrite(inode->i_sb);
 no_delete:
 	stat_dec_inline_dir(inode);
+	stat_dec_inline_inode(inode);
 	invalidate_mapping_pages(NODE_MAPPING(sbi), inode->i_ino, inode->i_ino);
 	if (xnid)
 		invalidate_mapping_pages(NODE_MAPPING(sbi), xnid, xnid);
@@ -327,7 +328,6 @@ void handle_failed_inode(struct inode *inode)
 		f2fs_truncate(inode);
 
 	remove_inode_page(inode);
-	stat_dec_inline_inode(inode);
 
 	clear_inode_flag(F2FS_I(inode), FI_INLINE_DENTRY);
 	alloc_nid_failed(sbi, inode->i_ino);
diff --git a/fs/f2fs/namei.c b/fs/f2fs/namei.c
index 94ba291..a004a97 100644
--- a/fs/f2fs/namei.c
+++ b/fs/f2fs/namei.c
@@ -198,8 +198,6 @@ static struct dentry *f2fs_lookup(struct inode *dir, struct dentry *dentry,
 		inode = f2fs_iget(dir->i_sb, ino);
 		if (IS_ERR(inode))
 			return ERR_CAST(inode);
-
-		stat_inc_inline_inode(inode);
 	}
 
 	return d_splice_alias(inode, dentry);
-- 
2.1.1


------------------------------------------------------------------------------
Comprehensive Server Monitoring with Site24x7.
Monitor 10 servers for $9/Month.
Get alerted through email, SMS, voice calls or mobile push notifications.
Take corrective actions from your mobile device.
http://p.sf.net/sfu/Zoho

  parent reply	other threads:[~2014-10-20  5:19 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-10-20  5:19 [PATCH 01/11] f2fs: reuse room_for_filename for inline dentry operation Jaegeuk Kim
2014-10-20  5:19 ` [PATCH 02/11] f2fs: reuse find_in_block code for find_in_inline_dir Jaegeuk Kim
2014-10-20  5:19 ` [PATCH 03/11] f2fs: fix to wait correct block type Jaegeuk Kim
2014-10-20  5:19 ` [PATCH 04/11] f2fs: avoid deadlock on init_inode_metadata Jaegeuk Kim
2014-10-20  5:19 ` [PATCH 05/11] f2fs: add stat info for inline_dentry inodes Jaegeuk Kim
2014-10-20  5:19 ` Jaegeuk Kim [this message]
2014-10-20  5:19 ` [PATCH 07/11] f2fs: reuse core function in f2fs_readdir for inline_dentry Jaegeuk Kim
2014-10-20  5:19 ` [PATCH 08/11] f2fs: should not truncate any inline_dentry Jaegeuk Kim
2014-10-20  5:19 ` [PATCH 09/11] f2fs: introduce f2fs_dentry_ptr structure for code clean-up Jaegeuk Kim
2014-10-20  5:19 ` [PATCH 10/11] f2fs: reuse make_empty_dir code for inline_dentry Jaegeuk Kim
2014-10-20  5:19 ` [PATCH 11/11] f2fs: use kmap_atomic instead of kmap Jaegeuk Kim

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1413782379-11758-6-git-send-email-jaegeuk@kernel.org \
    --to=jaegeuk@kernel.org \
    --cc=linux-f2fs-devel@lists.sourceforge.net \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).