summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNamhyung Kim <namhyung@gmail.com>2010-10-16 10:11:02 +0200
committerJan Kara <jack@suse.cz>2010-10-28 01:30:05 +0200
commite4d5e3a497e159be7c2dbe4c61cfb185d60cfde2 (patch)
treefdc0fda2f6baf45fac8f572936dd5828b301308a
parentext3: Remove misplaced BUFFER_TRACE() in ext3_truncate() (diff)
downloadlinux-e4d5e3a497e159be7c2dbe4c61cfb185d60cfde2.tar.xz
linux-e4d5e3a497e159be7c2dbe4c61cfb185d60cfde2.zip
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>
-rw-r--r--fs/jbd/checkpoint.c4
-rw-r--r--fs/jbd/commit.c2
2 files changed, 3 insertions, 3 deletions
diff --git a/fs/jbd/checkpoint.c b/fs/jbd/checkpoint.c
index 05a38b9c4c0e..e4b87bc1fa56 100644
--- a/fs/jbd/checkpoint.c
+++ b/fs/jbd/checkpoint.c
@@ -221,7 +221,7 @@ restart:
goto restart;
}
if (buffer_locked(bh)) {
- atomic_inc(&bh->b_count);
+ get_bh(bh);
spin_unlock(&journal->j_list_lock);
jbd_unlock_bh_state(bh);
wait_on_buffer(bh);
@@ -283,7 +283,7 @@ static int __process_buffer(journal_t *journal, struct journal_head *jh,
int ret = 0;
if (buffer_locked(bh)) {
- atomic_inc(&bh->b_count);
+ get_bh(bh);
spin_unlock(&journal->j_list_lock);
jbd_unlock_bh_state(bh);
wait_on_buffer(bh);
diff --git a/fs/jbd/commit.c b/fs/jbd/commit.c
index c8428323167f..a89c4630b1ed 100644
--- a/fs/jbd/commit.c
+++ b/fs/jbd/commit.c
@@ -611,7 +611,7 @@ void journal_commit_transaction(journal_t *journal)
/* Bump b_count to prevent truncate from stumbling over
the shadowed buffer! @@@ This can go if we ever get
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
(this will requeue both the metadata buffer and the