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: NJes Sorensen <Jes.Sorensen@redhat.com> Signed-off-by: NKevin Wolf <kwolf@redhat.com>
Showing
想要评论请 注册 或 登录