diff options
| author | Andrew Morton <akpm@digeo.com> | 2003-06-17 18:33:04 -0700 |
|---|---|---|
| committer | Linus Torvalds <torvalds@home.transmeta.com> | 2003-06-17 18:33:04 -0700 |
| commit | 3783536199cd942ac593d19e8d704faad7524a59 (patch) | |
| tree | 9859f0e0468ba44a23e7412c68ee2d26eae6827e /include/linux | |
| parent | b1a1826de7914f248e18b6ed97d07007f8806e47 (diff) | |
[PATCH] JBD: fix locking around log_start_commit()
There are various places in which JBD is starting a commit against a
transaction without sufficient locking in place to ensure that that
transaction is still alive.
Change it so that log_start_commit() takes a transaction ID instead. Make
the caller take a copy of that ID inside the appropriate locks.
Diffstat (limited to 'include/linux')
| -rw-r--r-- | include/linux/ext3_jbd.h | 11 | ||||
| -rw-r--r-- | include/linux/jbd.h | 11 |
2 files changed, 6 insertions, 16 deletions
diff --git a/include/linux/ext3_jbd.h b/include/linux/ext3_jbd.h index 67b0128364da..27b21821ce74 100644 --- a/include/linux/ext3_jbd.h +++ b/include/linux/ext3_jbd.h @@ -184,17 +184,6 @@ static inline handle_t *ext3_journal_current_handle(void) return journal_current_handle(); } -static inline void -ext3_log_start_commit(journal_t *journal, transaction_t *transaction) -{ - log_start_commit(journal, transaction); -} - -static inline void ext3_log_wait_commit(journal_t *journal, tid_t tid) -{ - log_wait_commit(journal, tid); -} - static inline int ext3_journal_extend(handle_t *handle, int nblocks) { return journal_extend(handle, nblocks); diff --git a/include/linux/jbd.h b/include/linux/jbd.h index 12c0d2372dc7..42d0caccf7e5 100644 --- a/include/linux/jbd.h +++ b/include/linux/jbd.h @@ -988,12 +988,13 @@ 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); +int log_start_commit(journal_t *journal, tid_t tid); +int __log_start_commit(journal_t *journal, tid_t tid); +int journal_start_commit(journal_t *journal, tid_t *tid); +int log_wait_commit(journal_t *journal, tid_t tid); +int log_do_checkpoint(journal_t *journal, int nblocks); -void __log_wait_for_space(journal_t *, int nblocks); +void __log_wait_for_space(journal_t *journal, int nblocks); extern void __journal_drop_transaction(journal_t *, transaction_t *); extern int cleanup_journal_tail(journal_t *); |
