]> git.neil.brown.name Git - history.git/commitdiff
[PATCH] JBD: buffer freeing non-race comment
authorAndrew Morton <akpm@digeo.com>
Wed, 18 Jun 2003 01:30:52 +0000 (18:30 -0700)
committerLinus Torvalds <torvalds@home.transmeta.com>
Wed, 18 Jun 2003 01:30:52 +0000 (18:30 -0700)
Add a comment describing why a race isn't there.

fs/jbd/transaction.c

index fad662aea660df33f92b7ea8f2a22937c2782b9c..6ee3a0820f2e801475ed1a4283d5ed67dd2459d0 100644 (file)
@@ -1643,6 +1643,11 @@ int journal_try_to_free_buffers(journal_t *journal,
        bh = head;
        do {
                jbd_lock_bh_state(bh);
+               /*
+                * We don't have to worry about the buffer being pulled off its
+                * journal_head in here, because __try_to_free_cp_buf runs
+                * under jbd_lock_bh_state()
+                */
                if (buffer_jbd(bh) &&
                                !__journal_try_to_free_buffer(journal, bh)) {
                        jbd_unlock_bh_state(bh);