Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1488522

[PATCH 1/4] f2fs: assign return value in f2fs_gc

From Jaegeuk Kim <jaegeuk@kernel.org>
Newsgroups linux.kernel
Subject [PATCH 1/4] f2fs: assign return value in f2fs_gc
Date 2016-09-22 06:00 +0200
Message-ID <sk3l0-17N-1@gated-at.bofh.it> (permalink)
Organization linux.* mail to news gateway

Show all headers | View raw


This patch adds a return value of write_checkpoint for f2fs_gc.

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

diff --git a/fs/f2fs/gc.c b/fs/f2fs/gc.c
index 24acbbb..400bc6d 100644
--- a/fs/f2fs/gc.c
+++ b/fs/f2fs/gc.c
@@ -925,10 +925,14 @@ gc_more:
 		 */
 		if (__get_victim(sbi, &segno, gc_type) ||
 						prefree_segments(sbi)) {
-			write_checkpoint(sbi, &cpc);
+			ret = write_checkpoint(sbi, &cpc);
+			if (ret)
+				goto stop;
 			segno = NULL_SEGNO;
 		} else if (has_not_enough_free_secs(sbi, 0, 0)) {
-			write_checkpoint(sbi, &cpc);
+			ret = write_checkpoint(sbi, &cpc);
+			if (ret)
+				goto stop;
 		}
 	}
 
@@ -948,7 +952,7 @@ gc_more:
 			goto gc_more;
 
 		if (gc_type == FG_GC)
-			write_checkpoint(sbi, &cpc);
+			ret = write_checkpoint(sbi, &cpc);
 	}
 stop:
 	mutex_unlock(&sbi->gc_mutex);
-- 
2.8.3

Back to linux.kernel | Previous | Next — Next in thread | Find similar | Unroll thread


Thread

[PATCH 1/4] f2fs: assign return value in f2fs_gc Jaegeuk Kim <jaegeuk@kernel.org> - 2016-09-22 06:00 +0200
  [PATCH 2/4] f2fs: should put_page for summary page Jaegeuk Kim <jaegeuk@kernel.org> - 2016-09-22 06:00 +0200
  Re: [f2fs-dev] [PATCH 1/4] f2fs: assign return value in f2fs_gc Chao Yu <yuchao0@huawei.com> - 2016-09-22 13:00 +0200

csiph-web