Commit 9cdf73b0 authored by Alexander Viro's avatar Alexander Viro Committed by Linus Torvalds

[PATCH] cramfs cleanup

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.
parent 9d78e51b
...@@ -134,7 +134,7 @@ static void *cramfs_read(struct super_block *sb, unsigned int offset, unsigned i ...@@ -134,7 +134,7 @@ static void *cramfs_read(struct super_block *sb, unsigned int offset, unsigned i
return read_buffers[i] + blk_offset; 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) if (!devsize)
devsize = ~0UL; devsize = ~0UL;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment