diff options
Diffstat (limited to 'fs/nilfs2/segment.c')
-rw-r--r-- | fs/nilfs2/segment.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/fs/nilfs2/segment.c b/fs/nilfs2/segment.c index e43558d50e78..fb70ec3be20e 100644 --- a/fs/nilfs2/segment.c +++ b/fs/nilfs2/segment.c | |||
@@ -2068,7 +2068,8 @@ static void nilfs_segctor_complete_write(struct nilfs_sc_info *sci) | |||
2068 | 2068 | ||
2069 | if (update_sr) { | 2069 | if (update_sr) { |
2070 | nilfs_set_last_segment(nilfs, segbuf->sb_pseg_start, | 2070 | nilfs_set_last_segment(nilfs, segbuf->sb_pseg_start, |
2071 | segbuf->sb_sum.seg_seq, nilfs->ns_cno); | 2071 | segbuf->sb_sum.seg_seq, nilfs->ns_cno++); |
2072 | sbi->s_super->s_dirt = 1; | ||
2072 | 2073 | ||
2073 | clear_bit(NILFS_SC_HAVE_DELTA, &sci->sc_flags); | 2074 | clear_bit(NILFS_SC_HAVE_DELTA, &sci->sc_flags); |
2074 | clear_bit(NILFS_SC_DIRTY, &sci->sc_flags); | 2075 | clear_bit(NILFS_SC_DIRTY, &sci->sc_flags); |
@@ -2224,9 +2225,6 @@ static int nilfs_segctor_do_construct(struct nilfs_sc_info *sci, int mode) | |||
2224 | 2225 | ||
2225 | /* Commit segments */ | 2226 | /* Commit segments */ |
2226 | if (has_sr) { | 2227 | if (has_sr) { |
2227 | down_write(&nilfs->ns_sem); | ||
2228 | nilfs_update_last_segment(sbi, 1); | ||
2229 | up_write(&nilfs->ns_sem); | ||
2230 | nilfs_segctor_commit_free_segments(sci); | 2228 | nilfs_segctor_commit_free_segments(sci); |
2231 | nilfs_segctor_clear_metadata_dirty(sci); | 2229 | nilfs_segctor_clear_metadata_dirty(sci); |
2232 | } | 2230 | } |
@@ -2564,7 +2562,7 @@ static int nilfs_segctor_construct(struct nilfs_sc_info *sci, | |||
2564 | if (test_bit(NILFS_SC_SUPER_ROOT, &sci->sc_flags) && | 2562 | if (test_bit(NILFS_SC_SUPER_ROOT, &sci->sc_flags) && |
2565 | nilfs_discontinued(nilfs)) { | 2563 | nilfs_discontinued(nilfs)) { |
2566 | down_write(&nilfs->ns_sem); | 2564 | down_write(&nilfs->ns_sem); |
2567 | req->sb_err = nilfs_commit_super(sbi); | 2565 | req->sb_err = nilfs_commit_super(sbi, 0); |
2568 | up_write(&nilfs->ns_sem); | 2566 | up_write(&nilfs->ns_sem); |
2569 | } | 2567 | } |
2570 | } | 2568 | } |