Skip to content

Commit 154ac5a

Browse files
swanlikonis
authored andcommitted
nilfs2: remove nilfs_segctor_init() in segment.c
There are only two lines of code in nilfs_segctor_init(). From a logic design view, the first line 'sci->sc_seq_done = sci->sc_seq_request;' should be put in nilfs_segctor_new(). Even in nilfs_segctor_new(), this initialization is needless because sci is kzalloc-ed. So nilfs_segctor_init() is only a wrap call to nilfs_segctor_start_thread(). Signed-off-by: Li Hong <lihong.hi@gmail.com> Signed-off-by: Ryusuke Konishi <konishi.ryusuke@lab.ntt.co.jp>
1 parent 50614bc commit 154ac5a

1 file changed

Lines changed: 1 addition & 8 deletions

File tree

‎fs/nilfs2/segment.c‎

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2685,13 +2685,6 @@ static void nilfs_segctor_kill_thread(struct nilfs_sc_info *sci)
26852685
}
26862686
}
26872687

2688-
static int nilfs_segctor_init(struct nilfs_sc_info *sci)
2689-
{
2690-
sci->sc_seq_done = sci->sc_seq_request;
2691-
2692-
return nilfs_segctor_start_thread(sci);
2693-
}
2694-
26952688
/*
26962689
* Setup & clean-up functions
26972690
*/
@@ -2815,7 +2808,7 @@ int nilfs_attach_segment_constructor(struct nilfs_sb_info *sbi)
28152808
return -ENOMEM;
28162809

28172810
nilfs_attach_writer(nilfs, sbi);
2818-
err = nilfs_segctor_init(NILFS_SC(sbi));
2811+
err = nilfs_segctor_start_thread(NILFS_SC(sbi));
28192812
if (err) {
28202813
nilfs_detach_writer(nilfs, sbi);
28212814
kfree(sbi->s_sc_info);

0 commit comments

Comments
 (0)