I believe the attached patch fixes a potential race in buffer.c:getblk() on SMP machines. The problem is that another CPU could potentially add the same buffer between us checking the hash table and adding the new buffer. Most callers currently take the big kernel lock first, but some don't - block_write, for example. I also nuked the comment at the top of get_hash_table, because it really doesn't seem to make sense..