f2fs: reassign new segment for mode=lfs
authorJaegeuk Kim <jaegeuk@kernel.org>
Wed, 21 Dec 2016 19:51:32 +0000 (11:51 -0800)
committerJaegeuk Kim <jaegeuk@kernel.org>
Sun, 29 Jan 2017 03:46:01 +0000 (12:46 +0900)
Otherwise we can remain wrong curseg->next_blkoff, resulting in fsck failure.

Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
fs/f2fs/segment.c

index cf98ba7bf645e276bc17e6252030c09e3f3f845d..b6bb6490a6403a20dc7141c028439cdaca6f0b5e 100644 (file)
@@ -1428,9 +1428,6 @@ void allocate_new_segments(struct f2fs_sb_info *sbi)
        unsigned int old_segno;
        int i;
 
-       if (test_opt(sbi, LFS))
-               return;
-
        for (i = CURSEG_HOT_DATA; i <= CURSEG_COLD_DATA; i++) {
                curseg = CURSEG_I(sbi, i);
                old_segno = curseg->segno;