--- zzzz-none-000/linux-2.4.17/fs/jbd/journal.c 2001-12-21 17:41:55.000000000 +0000 +++ sangam-fb-322/linux-2.4.17/fs/jbd/journal.c 2004-11-24 13:22:18.000000000 +0000 @@ -654,6 +654,8 @@ * We play buffer_head aliasing tricks to write data/metadata blocks to * the journal without copying their contents, but for journal * descriptor blocks we do need to generate bona fide buffers. + * + * We return a jh whose bh is locked and ready to be populated. */ struct journal_head * journal_get_descriptor_buffer(journal_t *journal) @@ -668,7 +670,7 @@ return NULL; bh = getblk(journal->j_dev, blocknr, journal->j_blocksize); - bh->b_state |= (1 << BH_Dirty); + lock_buffer(bh); BUFFER_TRACE(bh, "return this buffer"); return journal_add_journal_head(bh); }