Commit e3c95788 authored by Kees Cook's avatar Kees Cook Committed by Theodore Ts'o

jbd2: convert timers to use timer_setup()

In preparation for unconditionally passing the struct timer_list pointer to
all timer callbacks, switch to using the new timer_setup() and from_timer()
to pass the timer pointer explicitly.
Signed-off-by: default avatarKees Cook <keescook@chromium.org>
Signed-off-by: default avatarTheodore Ts'o <tytso@mit.edu>
Reviewed-by: default avatarJan Kara <jack@suse.com>
Cc: linux-ext4@vger.kernel.org
Cc: Thomas Gleixner <tglx@linutronix.de>
parent 8058cac6
...@@ -165,11 +165,11 @@ static void jbd2_superblock_csum_set(journal_t *j, journal_superblock_t *sb) ...@@ -165,11 +165,11 @@ static void jbd2_superblock_csum_set(journal_t *j, journal_superblock_t *sb)
* Helper function used to manage commit timeouts * Helper function used to manage commit timeouts
*/ */
static void commit_timeout(unsigned long __data) static void commit_timeout(struct timer_list *t)
{ {
struct task_struct * p = (struct task_struct *) __data; journal_t *journal = from_timer(journal, t, j_commit_timer);
wake_up_process(p); wake_up_process(journal->j_task);
} }
/* /*
...@@ -197,8 +197,7 @@ static int kjournald2(void *arg) ...@@ -197,8 +197,7 @@ static int kjournald2(void *arg)
* Set up an interval timer which can be used to trigger a commit wakeup * Set up an interval timer which can be used to trigger a commit wakeup
* after the commit interval expires * after the commit interval expires
*/ */
setup_timer(&journal->j_commit_timer, commit_timeout, timer_setup(&journal->j_commit_timer, commit_timeout, 0);
(unsigned long)current);
set_freezable(); set_freezable();
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment