Skip to content

Commit e4d5e3a

Browse files
namhyungjankara
authored andcommitted
jbd: Convert atomic_inc() to get_bh()
Convert atomic_inc(&bh->b_count) to get_bh(bh) for consistency. Signed-off-by: Namhyung Kim <namhyung@gmail.com> Signed-off-by: Jan Kara <jack@suse.cz>
1 parent bfa01df commit e4d5e3a

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

‎fs/jbd/checkpoint.c‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -221,7 +221,7 @@ static int __wait_cp_io(journal_t *journal, transaction_t *transaction)
221221
goto restart;
222222
}
223223
if (buffer_locked(bh)) {
224-
atomic_inc(&bh->b_count);
224+
get_bh(bh);
225225
spin_unlock(&journal->j_list_lock);
226226
jbd_unlock_bh_state(bh);
227227
wait_on_buffer(bh);
@@ -283,7 +283,7 @@ static int __process_buffer(journal_t *journal, struct journal_head *jh,
283283
int ret = 0;
284284

285285
if (buffer_locked(bh)) {
286-
atomic_inc(&bh->b_count);
286+
get_bh(bh);
287287
spin_unlock(&journal->j_list_lock);
288288
jbd_unlock_bh_state(bh);
289289
wait_on_buffer(bh);

‎fs/jbd/commit.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -611,7 +611,7 @@ void journal_commit_transaction(journal_t *journal)
611611
/* Bump b_count to prevent truncate from stumbling over
612612
the shadowed buffer! @@@ This can go if we ever get
613613
rid of the BJ_IO/BJ_Shadow pairing of buffers. */
614-
atomic_inc(&jh2bh(jh)->b_count);
614+
get_bh(jh2bh(jh));
615615

616616
/* Make a temporary IO buffer with which to write it out
617617
(this will requeue both the metadata buffer and the

0 commit comments

Comments
 (0)