diff options
| author | Andrew Morton <akpm@digeo.com> | 2003-06-17 18:31:15 -0700 |
|---|---|---|
| committer | Linus Torvalds <torvalds@home.transmeta.com> | 2003-06-17 18:31:15 -0700 |
| commit | fba1fdeecf6a0ddc41277bb200beec5ad89f8c61 (patch) | |
| tree | 41e78427a68e9d608fad46c3c41476641f99e9c9 /include | |
| parent | 28a4dd1ba782d5b0f27dca9632296a452c204286 (diff) | |
[PATCH] JBD: fix log_start_commit race
In start_this_handle() the caller does not have a handle ref pinning the
transaction open, and so the call to log_start_commit() is racy because some
other CPU could take the transaction into commit state independently.
Fix that by holding j_state_lock (which pins j_running_transaction) across
the log_start_commit() call.
Diffstat (limited to 'include')
| -rw-r--r-- | include/linux/jbd.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/include/linux/jbd.h b/include/linux/jbd.h index e0501a317e31..567c835eb73e 100644 --- a/include/linux/jbd.h +++ b/include/linux/jbd.h @@ -991,6 +991,7 @@ extern void journal_switch_revoke_table(journal_t *journal); int __log_space_left(journal_t *); /* Called with journal locked */ extern tid_t log_start_commit (journal_t *, transaction_t *); +extern tid_t __log_start_commit(journal_t *, transaction_t *); extern int log_wait_commit (journal_t *, tid_t); extern int log_do_checkpoint (journal_t *, int); |
