|
@@ -272,13 +272,13 @@ int create_flush_cmd_control(struct f2fs_sb_info *sbi)
|
|
return -ENOMEM;
|
|
return -ENOMEM;
|
|
spin_lock_init(&fcc->issue_lock);
|
|
spin_lock_init(&fcc->issue_lock);
|
|
init_waitqueue_head(&fcc->flush_wait_queue);
|
|
init_waitqueue_head(&fcc->flush_wait_queue);
|
|
- sbi->sm_info->cmd_control_info = fcc;
|
|
|
|
|
|
+ SM_I(sbi)->cmd_control_info = fcc;
|
|
fcc->f2fs_issue_flush = kthread_run(issue_flush_thread, sbi,
|
|
fcc->f2fs_issue_flush = kthread_run(issue_flush_thread, sbi,
|
|
"f2fs_flush-%u:%u", MAJOR(dev), MINOR(dev));
|
|
"f2fs_flush-%u:%u", MAJOR(dev), MINOR(dev));
|
|
if (IS_ERR(fcc->f2fs_issue_flush)) {
|
|
if (IS_ERR(fcc->f2fs_issue_flush)) {
|
|
err = PTR_ERR(fcc->f2fs_issue_flush);
|
|
err = PTR_ERR(fcc->f2fs_issue_flush);
|
|
kfree(fcc);
|
|
kfree(fcc);
|
|
- sbi->sm_info->cmd_control_info = NULL;
|
|
|
|
|
|
+ SM_I(sbi)->cmd_control_info = NULL;
|
|
return err;
|
|
return err;
|
|
}
|
|
}
|
|
|
|
|
|
@@ -287,13 +287,12 @@ int create_flush_cmd_control(struct f2fs_sb_info *sbi)
|
|
|
|
|
|
void destroy_flush_cmd_control(struct f2fs_sb_info *sbi)
|
|
void destroy_flush_cmd_control(struct f2fs_sb_info *sbi)
|
|
{
|
|
{
|
|
- struct flush_cmd_control *fcc =
|
|
|
|
- sbi->sm_info->cmd_control_info;
|
|
|
|
|
|
+ struct flush_cmd_control *fcc = SM_I(sbi)->cmd_control_info;
|
|
|
|
|
|
if (fcc && fcc->f2fs_issue_flush)
|
|
if (fcc && fcc->f2fs_issue_flush)
|
|
kthread_stop(fcc->f2fs_issue_flush);
|
|
kthread_stop(fcc->f2fs_issue_flush);
|
|
kfree(fcc);
|
|
kfree(fcc);
|
|
- sbi->sm_info->cmd_control_info = NULL;
|
|
|
|
|
|
+ SM_I(sbi)->cmd_control_info = NULL;
|
|
}
|
|
}
|
|
|
|
|
|
static void __locate_dirty_segment(struct f2fs_sb_info *sbi, unsigned int segno,
|
|
static void __locate_dirty_segment(struct f2fs_sb_info *sbi, unsigned int segno,
|