patch-2.4.18 linux/fs/minix/itree_common.c

Next file: linux/fs/namei.c
Previous file: linux/fs/minix/inode.c
Back to the patch index
Back to the overall index

diff -Naur -X /home/marcelo/lib/dontdiff linux.orig/fs/minix/itree_common.c linux/fs/minix/itree_common.c
@@ -30,7 +30,7 @@
 					Indirect chain[DEPTH],
 					int *err)
 {
-	kdev_t dev = inode->i_dev;
+	struct super_block *sb = inode->i_sb;
 	Indirect *p = chain;
 	struct buffer_head *bh;
 
@@ -40,7 +40,7 @@
 	if (!p->key)
 		goto no_block;
 	while (--depth) {
-		bh = bread(dev, block_to_cpu(p->key), BLOCK_SIZE);
+		bh = sb_bread(sb, block_to_cpu(p->key));
 		if (!bh)
 			goto failure;
 		/* Reader: pointers */
@@ -79,7 +79,7 @@
 		if (!nr)
 			break;
 		branch[n].key = cpu_to_block(nr);
-		bh = getblk(inode->i_dev, parent, BLOCK_SIZE);
+		bh = sb_getblk(inode->i_sb, parent);
 		lock_buffer(bh);
 		memset(bh->b_data, 0, BLOCK_SIZE);
 		branch[n].bh = bh;
@@ -277,7 +277,7 @@
 			if (!nr)
 				continue;
 			*p = 0;
-			bh = bread (inode->i_dev, nr, BLOCK_SIZE);
+			bh = sb_bread(inode->i_sb, nr);
 			if (!bh)
 				continue;
 			free_branches(inode, (block_t*)bh->b_data,

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