Commit e4d5e3a4 authored by Namhyung Kim's avatar Namhyung Kim Committed by Jan Kara

jbd: Convert atomic_inc() to get_bh()

Convert atomic_inc(&bh->b_count) to get_bh(bh) for consistency.
Signed-off-by: default avatarNamhyung Kim <namhyung@gmail.com>
Signed-off-by: default avatarJan Kara <jack@suse.cz>
parent bfa01dfb
...@@ -221,7 +221,7 @@ static int __wait_cp_io(journal_t *journal, transaction_t *transaction) ...@@ -221,7 +221,7 @@ static int __wait_cp_io(journal_t *journal, transaction_t *transaction)
goto restart; goto restart;
} }
if (buffer_locked(bh)) { if (buffer_locked(bh)) {
atomic_inc(&bh->b_count); get_bh(bh);
spin_unlock(&journal->j_list_lock); spin_unlock(&journal->j_list_lock);
jbd_unlock_bh_state(bh); jbd_unlock_bh_state(bh);
wait_on_buffer(bh); wait_on_buffer(bh);
...@@ -283,7 +283,7 @@ static int __process_buffer(journal_t *journal, struct journal_head *jh, ...@@ -283,7 +283,7 @@ static int __process_buffer(journal_t *journal, struct journal_head *jh,
int ret = 0; int ret = 0;
if (buffer_locked(bh)) { if (buffer_locked(bh)) {
atomic_inc(&bh->b_count); get_bh(bh);
spin_unlock(&journal->j_list_lock); spin_unlock(&journal->j_list_lock);
jbd_unlock_bh_state(bh); jbd_unlock_bh_state(bh);
wait_on_buffer(bh); wait_on_buffer(bh);
......
...@@ -611,7 +611,7 @@ void journal_commit_transaction(journal_t *journal) ...@@ -611,7 +611,7 @@ void journal_commit_transaction(journal_t *journal)
/* Bump b_count to prevent truncate from stumbling over /* Bump b_count to prevent truncate from stumbling over
the shadowed buffer! @@@ This can go if we ever get the shadowed buffer! @@@ This can go if we ever get
rid of the BJ_IO/BJ_Shadow pairing of buffers. */ rid of the BJ_IO/BJ_Shadow pairing of buffers. */
atomic_inc(&jh2bh(jh)->b_count); get_bh(jh2bh(jh));
/* Make a temporary IO buffer with which to write it out /* Make a temporary IO buffer with which to write it out
(this will requeue both the metadata buffer and the (this will requeue both the metadata buffer and the
......
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