Re: [patch 1/21] random fixes

From: Alexander Viro (viro@math.psu.edu)
Date: Sun Aug 11 2002 - 02:56:57 EST


On Sun, 11 Aug 2002, Andrew Morton wrote:

> flush_dcache_page(page);
> --- 2.5.31/fs/block_dev.c~misc Sat Aug 10 23:23:35 2002
> +++ 2.5.31-akpm/fs/block_dev.c Sat Aug 10 23:23:35 2002
> @@ -26,12 +26,12 @@
>
> static sector_t max_block(struct block_device *bdev)
> {
> - sector_t retval = ~0U;
> + sector_t retval = ~((sector_t)0);
> loff_t sz = bdev->bd_inode->i_size;
>
> if (sz) {
> - sector_t size = block_size(bdev);
> - unsigned sizebits = blksize_bits(size);
> + unsigned int size = block_size(bdev);
> + unsigned int sizebits = blksize_bits(size);
> retval = (sz >> sizebits);

Ugh. Why do we have all that stuff, anyway?

        bdev->bd_inode->i_size >> bdev->bd_inode->i_blkbits

should work just fine...

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Thu Aug 15 2002 - 22:00:23 EST