jbd: Convert atomic_inc() to get_bh()
authorNamhyung Kim <namhyung@gmail.com>
Sat, 16 Oct 2010 08:11:02 +0000 (17:11 +0900)
committerJan Kara <jack@suse.cz>
Wed, 27 Oct 2010 23:30:05 +0000 (01:30 +0200)
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>
fs/jbd/checkpoint.c
fs/jbd/commit.c

index 05a38b9c4c0ecbe749ef73931933c0e089fe15ba..e4b87bc1fa56e0dd2ff8c77ae853367f3a529a81 100644 (file)
@@ -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);
index c8428323167f1f8c242f1dddd4ccc2ce184dce9d..a89c4630b1ed8a0048a36cfb9718d9aaba3a08ec 100644 (file)
@@ -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