--- 2.3.17-pre1/fs/buffer.c Wed Sep 8 00:26:01 1999 +++ buffer.c Wed Sep 8 00:30:58 1999 @@ -787,30 +787,29 @@ atomic_set(&bh->b_count, 1); } spin_unlock(&free_list[isize].lock); - if (!bh) - goto refill; - - /* OK, FINALLY we know that this buffer is the only one of its kind, - * we hold a reference (b_count>0), it is unlocked, and it is clean. - */ - init_buffer(bh, end_buffer_io_sync, NULL); - bh->b_dev = dev; - bh->b_blocknr = block; - bh->b_state = 1 << BH_Mapped; - - /* Insert the buffer into the regular lists */ - insert_into_queues(bh); - goto out; + if (bh) + { + /* OK, FINALLY we know that this buffer is the only one of + its kind, we hold a reference (b_count>0), it is unlocked, + and it is clean. */ + init_buffer(bh, end_buffer_io_sync, NULL); + bh->b_dev = dev; + bh->b_blocknr = block; + bh->b_state = 1 << BH_Mapped; + + /* Insert the buffer into the regular lists */ + insert_into_queues(bh); + out: + touch_buffer(bh); + return bh; + } /* * If we block while refilling the free list, somebody may * create the buffer first ... search the hashes again. */ -refill: refill_freelist(size); goto repeat; -out: - return bh; } /* @@ -881,8 +880,6 @@ */ void __brelse(struct buffer_head * buf) { - touch_buffer(buf); - if (atomic_read(&buf->b_count)) { atomic_dec(&buf->b_count); return;