1 Index: linux/fs/buffer.c
2 ===================================================================
3 --- linux.orig/fs/buffer.c
5 @@ -509,13 +509,18 @@ __find_get_block_slow(struct block_devic
6 struct buffer_head *head;
11 index = block >> (PAGE_CACHE_SHIFT - bd_inode->i_blkbits);
12 page = find_get_page(bd_mapping, index);
16 + if (unlikely(TestSetPageLocked(page))) {
17 spin_lock(&bd_mapping->private_lock);
21 if (!page_has_buffers(page))
23 head = page_buffers(page);
24 @@ -536,7 +541,7 @@ __find_get_block_slow(struct block_devic
25 * file io on the block device and getblk. It gets dealt with
26 * elsewhere, don't buffer_error if we had some unmapped buffers
29 + if (unlikely(all_mapped)) {
30 printk("__find_get_block_slow() failed. "
31 "block=%llu, b_blocknr=%llu\n",
32 (unsigned long long)block, (unsigned long long)bh->b_blocknr);
33 @@ -544,7 +549,10 @@ __find_get_block_slow(struct block_devic
34 printk("device blocksize: %d\n", 1 << bd_inode->i_blkbits);
37 + if (unlikely(spinlock))
38 spin_unlock(&bd_mapping->private_lock);
41 page_cache_release(page);