aboutsummaryrefslogtreecommitdiffstats
path: root/fs/jbd2/journal.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/jbd2/journal.c')
-rw-r--r--fs/jbd2/journal.c13
1 files changed, 9 insertions, 4 deletions
diff --git a/fs/jbd2/journal.c b/fs/jbd2/journal.c
index 6b3158ec9e2c..78d63b818f0b 100644
--- a/fs/jbd2/journal.c
+++ b/fs/jbd2/journal.c
@@ -210,10 +210,16 @@ end_loop:
210 return 0; 210 return 0;
211} 211}
212 212
213static void jbd2_journal_start_thread(journal_t *journal) 213static int jbd2_journal_start_thread(journal_t *journal)
214{ 214{
215 kthread_run(kjournald2, journal, "kjournald2"); 215 struct task_struct *t;
216
217 t = kthread_run(kjournald2, journal, "kjournald2");
218 if (IS_ERR(t))
219 return PTR_ERR(t);
220
216 wait_event(journal->j_wait_done_commit, journal->j_task != 0); 221 wait_event(journal->j_wait_done_commit, journal->j_task != 0);
222 return 0;
217} 223}
218 224
219static void journal_kill_thread(journal_t *journal) 225static void journal_kill_thread(journal_t *journal)
@@ -839,8 +845,7 @@ static int journal_reset(journal_t *journal)
839 845
840 /* Add the dynamic fields and write it to disk. */ 846 /* Add the dynamic fields and write it to disk. */
841 jbd2_journal_update_superblock(journal, 1); 847 jbd2_journal_update_superblock(journal, 1);
842 jbd2_journal_start_thread(journal); 848 return jbd2_journal_start_thread(journal);
843 return 0;
844} 849}
845 850
846/** 851/**