All of lore.kernel.org
 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 2/4] f2fs: should put_page for summary page
Date: Wed, 21 Sep 2016 20:54:56 -0700	[thread overview]
Message-ID: <20160922035458.5002-2-jaegeuk@kernel.org> (raw)
In-Reply-To: <20160922035458.5002-1-jaegeuk@kernel.org>

We should call put_page for preloaded summary pages in do_garbage_collect.

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

diff --git a/fs/f2fs/gc.c b/fs/f2fs/gc.c
index 400bc6d..a9a3c9f 100644
--- a/fs/f2fs/gc.c
+++ b/fs/f2fs/gc.c
@@ -848,7 +848,7 @@ static int do_garbage_collect(struct f2fs_sb_info *sbi,
 	for (segno = start_segno; segno < end_segno; segno++) {
 
 		if (get_valid_blocks(sbi, segno, 1) == 0)
-			continue;
+			goto next;
 
 		/* find segment summary of victim */
 		sum_page = find_get_page(META_MAPPING(sbi),
@@ -874,7 +874,7 @@ static int do_garbage_collect(struct f2fs_sb_info *sbi,
 								gc_type);
 
 		stat_inc_seg_count(sbi, type, gc_type);
-
+next:
 		f2fs_put_page(sum_page, 0);
 	}
 
-- 
2.8.3

  reply	other threads:[~2016-09-22  3:55 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-09-22  3:54 [PATCH 1/4] f2fs: assign return value in f2fs_gc Jaegeuk Kim
2016-09-22  3:54 ` Jaegeuk Kim
2016-09-22  3:54 ` Jaegeuk Kim [this message]
2016-09-22  3:54 ` [PATCH 3/4] f2fs: avoid gc in cp_error case Jaegeuk Kim
2016-09-22  3:54   ` Jaegeuk Kim
2016-09-22  3:54 ` [PATCH 4/4] f2fs: handle errors during recover_orphan_inodes Jaegeuk Kim
2016-09-22  3:54   ` Jaegeuk Kim
2016-09-22 10:58 ` [f2fs-dev] [PATCH 1/4] f2fs: assign return value in f2fs_gc Chao Yu
2016-09-22 10:58   ` Chao Yu

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=20160922035458.5002-2-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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.