]> git.hungrycats.org Git - linux/commitdiff
[PATCH] cramfs cleanup
authorAlexander Viro <viro@math.psu.edu>
Wed, 10 Apr 2002 04:32:08 +0000 (21:32 -0700)
committerLinus Torvalds <torvalds@penguin.transmeta.com>
Wed, 10 Apr 2002 04:32:08 +0000 (21:32 -0700)
All places where we do blkdev_size_in_bytes(sb->s_dev) are bogus - we
can get the same information from ->s_bdev without messing with kdev_t,
major/minor, etc.

There will be more patches of that kind - in the long run I'd expect
only one caller of blkdev_size_in_bytes() to survive.  One if
fs/block_dev.c, that is - called when we open device.

fs/cramfs/inode.c

index ab96db6b972e06470ad3fc46e403eed77fd01432..e896adad28ecd597b44a64721a92efb3622ac296 100644 (file)
@@ -134,7 +134,7 @@ static void *cramfs_read(struct super_block *sb, unsigned int offset, unsigned i
                return read_buffers[i] + blk_offset;
        }
 
-       devsize = blkdev_size_in_bytes(sb->s_dev) >> 12;
+       devsize = sb->s_bdev->bd_inode->i_size >> 12;
        if (!devsize)
                devsize = ~0UL;