summaryrefslogtreecommitdiff
path: root/fs/nilfs2/segment.c
diff options
context:
space:
mode:
authorLi Hong <lihong.hi@gmail.com>2010-04-10 13:57:11 (GMT)
committerRyusuke Konishi <konishi.ryusuke@lab.ntt.co.jp>2010-05-10 02:32:31 (GMT)
commit154ac5a83014cd6ea72e4ac5018bf8c10ee9a79e (patch)
treeea772f3e5b301e1dbf81c6ff9821711c9de61db6 /fs/nilfs2/segment.c
parent50614bcf29d0cec6df5b84c0d8331e8b8c7d72a7 (diff)
downloadlinux-154ac5a83014cd6ea72e4ac5018bf8c10ee9a79e.tar.xz
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>
Diffstat (limited to 'fs/nilfs2/segment.c')
-rw-r--r--fs/nilfs2/segment.c9
1 files changed, 1 insertions, 8 deletions
diff --git a/fs/nilfs2/segment.c b/fs/nilfs2/segment.c
index 9f50fde..89a15f4 100644
--- a/fs/nilfs2/segment.c
+++ b/fs/nilfs2/segment.c
@@ -2685,13 +2685,6 @@ static void nilfs_segctor_kill_thread(struct nilfs_sc_info *sci)
}
}
-static int nilfs_segctor_init(struct nilfs_sc_info *sci)
-{
- sci->sc_seq_done = sci->sc_seq_request;
-
- return nilfs_segctor_start_thread(sci);
-}
-
/*
* Setup & clean-up functions
*/
@@ -2815,7 +2808,7 @@ int nilfs_attach_segment_constructor(struct nilfs_sb_info *sbi)
return -ENOMEM;
nilfs_attach_writer(nilfs, sbi);
- err = nilfs_segctor_init(NILFS_SC(sbi));
+ err = nilfs_segctor_start_thread(NILFS_SC(sbi));
if (err) {
nilfs_detach_writer(nilfs, sbi);
kfree(sbi->s_sc_info);