diff options
author | Kees Cook <keescook@chromium.org> | 2017-10-18 19:40:28 +0300 |
---|---|---|
committer | Theodore Ts'o <tytso@mit.edu> | 2017-10-18 19:40:28 +0300 |
commit | e3c957885e4286af2e3f03277bb0cb8b049e72c9 (patch) | |
tree | c14563423b2940a6a62fc663ae7ed9c4f4e93f72 /fs/jbd2 | |
parent | 8058cac6a1d5dc8a2e309fafbfa341fd43d54528 (diff) | |
download | linux-e3c957885e4286af2e3f03277bb0cb8b049e72c9.tar.xz |
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: Kees Cook <keescook@chromium.org>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Reviewed-by: Jan Kara <jack@suse.com>
Cc: linux-ext4@vger.kernel.org
Cc: Thomas Gleixner <tglx@linutronix.de>
Diffstat (limited to 'fs/jbd2')
-rw-r--r-- | fs/jbd2/journal.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/fs/jbd2/journal.c b/fs/jbd2/journal.c index 7d5ef3bf3f3e..d2a85c9720e9 100644 --- a/fs/jbd2/journal.c +++ b/fs/jbd2/journal.c @@ -165,11 +165,11 @@ static void jbd2_superblock_csum_set(journal_t *j, journal_superblock_t *sb) * 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) * Set up an interval timer which can be used to trigger a commit wakeup * after the commit interval expires */ - setup_timer(&journal->j_commit_timer, commit_timeout, - (unsigned long)current); + timer_setup(&journal->j_commit_timer, commit_timeout, 0); set_freezable(); |