patch-2.4.6 linux/drivers/block/loop.c

Next file: linux/drivers/block/nbd.c
Previous file: linux/drivers/block/ll_rw_blk.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.4.5/linux/drivers/block/loop.c linux/drivers/block/loop.c
@@ -386,7 +386,7 @@
 	struct buffer_head *bh;
 
 	do {
-		bh = kmem_cache_alloc(bh_cachep, SLAB_BUFFER);
+		bh = kmem_cache_alloc(bh_cachep, SLAB_NOIO);
 		if (bh)
 			break;
 
@@ -408,7 +408,7 @@
 	 * so can we :-)
 	 */
 	do {
-		bh->b_page = alloc_page(GFP_BUFFER);
+		bh->b_page = alloc_page(GFP_NOIO);
 		if (bh->b_page)
 			break;
 
@@ -648,11 +648,11 @@
 	lo->ioctl = NULL;
 	figure_loop_size(lo);
 	lo->old_gfp_mask = inode->i_mapping->gfp_mask;
-	inode->i_mapping->gfp_mask = GFP_BUFFER;
+	inode->i_mapping->gfp_mask = GFP_NOIO;
 
 	bs = 0;
-	if (blksize_size[MAJOR(inode->i_rdev)])
-		bs = blksize_size[MAJOR(inode->i_rdev)][MINOR(inode->i_rdev)];
+	if (blksize_size[MAJOR(lo_device)])
+		bs = blksize_size[MAJOR(lo_device)][MINOR(lo_device)];
 	if (!bs)
 		bs = BLOCK_SIZE;
 

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)