um: fix ubd cow size
commit 85356398 upstream. 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> Signed-off-by:
Greg Kroah-Hartman <gregkh@suse.de> Signed-off-by:
Willy Tarreau <w@1wt.eu>
Loading
Please sign in to comment