All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/4] f2fs: assign return value in f2fs_gc
@ 2016-09-22  3:54 ` Jaegeuk Kim
  0 siblings, 0 replies; 9+ messages in thread
From: Jaegeuk Kim @ 2016-09-22  3:54 UTC (permalink / raw)
  To: linux-kernel, linux-fsdevel, linux-f2fs-devel; +Cc: Jaegeuk Kim

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

^ permalink raw reply related	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2016-09-22 10:58 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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 ` [PATCH 2/4] f2fs: should put_page for summary page Jaegeuk Kim
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

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.