patch-2.4.10 linux/fs/freevxfs/vxfs_olt.c

Next file: linux/fs/freevxfs/vxfs_super.c
Previous file: linux/fs/freevxfs/vxfs_inode.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.4.9/linux/fs/freevxfs/vxfs_olt.c linux/fs/freevxfs/vxfs_olt.c
@@ -27,7 +27,7 @@
  * SUCH DAMAGE.
  */
 
-#ident "$Id: vxfs_olt.c,v 1.8 2001/04/25 18:11:23 hch Exp hch $"
+#ident "$Id: vxfs_olt.c,v 1.9 2001/08/07 16:14:45 hch Exp hch $"
 
 /* 
  * Veritas filesystem driver - object location table support.
@@ -56,11 +56,11 @@
 }
 
 static __inline__ u_long
-vxfs_oblock(daddr_t oblock, u_long bsize)
+vxfs_oblock(struct super_block *sbp, daddr_t block, u_long bsize)
 {
-	if ((oblock * BLOCK_SIZE) % bsize)
+	if (sbp->s_blocksize % bsize)
 		BUG();
-	return ((oblock * BLOCK_SIZE) / bsize);
+	return (block * (sbp->s_blocksize / bsize));
 }
 
 
@@ -85,7 +85,8 @@
 	char			*oaddr, *eaddr;
 
 
-	bp = bread(sbp->s_dev, vxfs_oblock(infp->vsi_oltext, bsize), bsize);
+	bp = bread(sbp->s_dev,
+			vxfs_oblock(sbp, infp->vsi_oltext, bsize), bsize);
 	if (!bp || !bp->b_data)
 		goto fail;
 

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