Cleanup: bdrv_open() no need to shift total_size just to shift back.
authorJes Sorensen <Jes.Sorensen@redhat.com>
Thu, 27 May 2010 14:20:30 +0000 (16:20 +0200)
committerKevin Wolf <kwolf@redhat.com>
Fri, 4 Jun 2010 09:43:39 +0000 (11:43 +0200)
commit0705e950afe18884dc271ee0179a986601515c42
treeba5c89885d52e6c2e240e21393c92f822d677c04
parent394dd01704a016a6a53853f1c7bfee7e6f1c97a7
Cleanup: bdrv_open() no need to shift total_size just to shift back.

In bdrv_open() there is no need to shift total_size >> 9 just to
multiply it by 512 again just a few lines later, since this is the
only place the variable is used.

Mask with BDRV_SECTOR_MASK to protect against case where we are
passed a corrupted image.

Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
block.c