|
@@ -2400,11 +2400,11 @@ static int nilfs_segctor_construct(struct nilfs_sc_info *sci, int mode)
|
|
|
return err;
|
|
|
}
|
|
|
|
|
|
-static void nilfs_construction_timeout(unsigned long data)
|
|
|
+static void nilfs_construction_timeout(struct timer_list *t)
|
|
|
{
|
|
|
- struct task_struct *p = (struct task_struct *)data;
|
|
|
+ struct nilfs_sc_info *sci = from_timer(sci, t, sc_timer);
|
|
|
|
|
|
- wake_up_process(p);
|
|
|
+ wake_up_process(sci->sc_timer_task);
|
|
|
}
|
|
|
|
|
|
static void
|
|
@@ -2542,8 +2542,7 @@ static int nilfs_segctor_thread(void *arg)
|
|
|
struct the_nilfs *nilfs = sci->sc_super->s_fs_info;
|
|
|
int timeout = 0;
|
|
|
|
|
|
- sci->sc_timer.data = (unsigned long)current;
|
|
|
- sci->sc_timer.function = nilfs_construction_timeout;
|
|
|
+ sci->sc_timer_task = current;
|
|
|
|
|
|
/* start sync. */
|
|
|
sci->sc_task = current;
|
|
@@ -2674,7 +2673,7 @@ static struct nilfs_sc_info *nilfs_segctor_new(struct super_block *sb,
|
|
|
INIT_LIST_HEAD(&sci->sc_gc_inodes);
|
|
|
INIT_LIST_HEAD(&sci->sc_iput_queue);
|
|
|
INIT_WORK(&sci->sc_iput_work, nilfs_iput_work_func);
|
|
|
- init_timer(&sci->sc_timer);
|
|
|
+ timer_setup(&sci->sc_timer, nilfs_construction_timeout, 0);
|
|
|
|
|
|
sci->sc_interval = HZ * NILFS_SC_DEFAULT_TIMEOUT;
|
|
|
sci->sc_mjcp_freq = HZ * NILFS_SC_DEFAULT_SR_FREQ;
|