um: fix ubd cow size
authorRichard Weinberger <richard@nod.at>
Wed, 2 Nov 2011 12:17:27 +0000 (13:17 +0100)
committerRichard Weinberger <richard@nod.at>
Wed, 2 Nov 2011 13:15:42 +0000 (14:15 +0100)
commit8535639810e578960233ad39def3ac2157b0c3ec
tree519778b447082e802b42c2d6720475ca1cc7c96e
parent0d65ede0a605d6252acc5c8a9c536c4cd0211f3c
um: fix ubd cow size

ubd_file_size() cannot use ubd_dev->cow.file because at this time
ubd_dev->cow.file is not initialized.
Therefore, ubd_file_size() will always report a wrong disk size when
COW files are used.
Reading from /dev/ubd* would crash the kernel.

We have to read the correct disk size from the COW file's backing
file.

Signed-off-by: Richard Weinberger <richard@nod.at>
CC: stable@kernel.org
arch/um/drivers/ubd_kern.c