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 7/7] f2fs: don't need to flush unlinked dentry pages
Date: Wed,  8 Jun 2016 10:24:44 -0700	[thread overview]
Message-ID: <20160608172444.60371-7-jaegeuk@kernel.org> (raw)
In-Reply-To: <20160608172444.60371-1-jaegeuk@kernel.org>

We don't need to flush any dentry pages used by unlinked directory.
They will be truncated by f2fs_evict_inode.

Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
---
 fs/f2fs/checkpoint.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/fs/f2fs/checkpoint.c b/fs/f2fs/checkpoint.c
index 4179c7b..e6714cb 100644
--- a/fs/f2fs/checkpoint.c
+++ b/fs/f2fs/checkpoint.c
@@ -846,7 +846,8 @@ retry:
 	inode = igrab(&fi->vfs_inode);
 	spin_unlock(&sbi->inode_lock[type]);
 	if (inode) {
-		filemap_fdatawrite(inode->i_mapping);
+		if (inode->i_nlink)
+			filemap_fdatawrite(inode->i_mapping);
 		iput(inode);
 	} else {
 		/*
-- 
2.8.3


      parent reply	other threads:[~2016-06-08 17:24 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-06-08 17:24 [PATCH 1/7] f2fs: set mapping error for EIO Jaegeuk Kim
2016-06-08 17:24 ` [PATCH 2/7] f2fs: avoid reverse IO order for NODE and DATA Jaegeuk Kim
2016-06-08 17:24 ` [PATCH 3/7] f2fs: drop any block plugging Jaegeuk Kim
2016-07-09  2:28   ` [f2fs-dev] " Chao Yu
2016-07-09 16:32     ` Jaegeuk Kim
2016-07-12  1:38       ` Chao Yu
2016-07-12 17:08         ` Jaegeuk Kim
2016-07-13  1:21           ` hebiao (G)
2016-07-14  2:39             ` Jaegeuk Kim
2016-07-14  6:07               ` hebiao (G)
2016-06-08 17:24 ` [PATCH 4/7] f2fs: skip clean segment for gc Jaegeuk Kim
2016-06-08 17:24 ` [PATCH 5/7] f2fs: introduce force_lfs mount option Jaegeuk Kim
2016-06-08 17:24 ` [PATCH 6/7] f2fs: fix deadlock in add_link failure Jaegeuk Kim
2016-06-08 17:24 ` Jaegeuk Kim [this message]

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=20160608172444.60371-7-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).