aboutsummaryrefslogtreecommitdiffstats
path: root/fs/nilfs2/segment.c
diff options
context:
space:
mode:
authorRyusuke Konishi <konishi.ryusuke@lab.ntt.co.jp>2010-03-22 01:01:24 -0400
committerRyusuke Konishi <konishi.ryusuke@lab.ntt.co.jp>2010-03-22 01:41:07 -0400
commit2d8428acaee5468d194d8a84de22a0797791cb33 (patch)
tree4d7b400be54f01b9756bffe421c109c19dafe458 /fs/nilfs2/segment.c
parent220bf991b0366cc50a94feede3d7341fa5710ee4 (diff)
nilfs2: fix duplicate call to nilfs_segctor_cancel_freev
Andreas Beckmann gave me a report that nilfs logged the following warnings when it got a disk full: nilfs_sufile_do_cancel_free: segment 0 must be clean nilfs_sufile_do_cancel_free: segment 1 must be clean These arise from a duplicate call to nilfs_segctor_cancel_freev in an error path of log writer. This will fix the issue. Reported-by: Andreas Beckmann <debian@abeckmann.de> Signed-off-by: Ryusuke Konishi <konishi.ryusuke@lab.ntt.co.jp>
Diffstat (limited to 'fs/nilfs2/segment.c')
-rw-r--r--fs/nilfs2/segment.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/fs/nilfs2/segment.c b/fs/nilfs2/segment.c
index 69576a95e13f..b6221230f840 100644
--- a/fs/nilfs2/segment.c
+++ b/fs/nilfs2/segment.c
@@ -1510,6 +1510,12 @@ static int nilfs_segctor_collect(struct nilfs_sc_info *sci,
1510 if (mode != SC_LSEG_SR || sci->sc_stage.scnt < NILFS_ST_CPFILE) 1510 if (mode != SC_LSEG_SR || sci->sc_stage.scnt < NILFS_ST_CPFILE)
1511 break; 1511 break;
1512 1512
1513 nilfs_clear_logs(&sci->sc_segbufs);
1514
1515 err = nilfs_segctor_extend_segments(sci, nilfs, nadd);
1516 if (unlikely(err))
1517 return err;
1518
1513 if (sci->sc_stage.flags & NILFS_CF_SUFREED) { 1519 if (sci->sc_stage.flags & NILFS_CF_SUFREED) {
1514 err = nilfs_sufile_cancel_freev(nilfs->ns_sufile, 1520 err = nilfs_sufile_cancel_freev(nilfs->ns_sufile,
1515 sci->sc_freesegs, 1521 sci->sc_freesegs,
@@ -1517,12 +1523,6 @@ static int nilfs_segctor_collect(struct nilfs_sc_info *sci,
1517 NULL); 1523 NULL);
1518 WARN_ON(err); /* do not happen */ 1524 WARN_ON(err); /* do not happen */
1519 } 1525 }
1520 nilfs_clear_logs(&sci->sc_segbufs);
1521
1522 err = nilfs_segctor_extend_segments(sci, nilfs, nadd);
1523 if (unlikely(err))
1524 return err;
1525
1526 nadd = min_t(int, nadd << 1, SC_MAX_SEGDELTA); 1526 nadd = min_t(int, nadd << 1, SC_MAX_SEGDELTA);
1527 sci->sc_stage = prev_stage; 1527 sci->sc_stage = prev_stage;
1528 } 1528 }