ACK: [SRU][Xenial][PATCH] nbd: fix 64-bit division
Stefan Bader
stefan.bader at canonical.com
Wed Jun 6 12:57:50 UTC 2018
On 06.06.2018 05:22, Juerg Haefliger wrote:
> From: Jens Axboe <axboe at fb.com>
>
> BugLink: http://bugs.launchpad.net/bugs/1772575
>
> We have this:
>
> ERROR: "__aeabi_ldivmod" [drivers/block/nbd.ko] undefined!
> ERROR: "__divdi3" [drivers/block/nbd.ko] undefined!
> nbd.c:(.text+0x247c72): undefined reference to `__divdi3'
>
> due to a recent commit, that did 64-bit division. Use the proper
> divider function so that 32-bit compiles don't break.
>
> Fixes: ef77b515243b ("nbd: use loff_t for blocksize and nbd_set_size args")
> Signed-off-by: Jens Axboe <axboe at fb.com>
> (cherry picked from commit e88f72cb9f54f6d244e55f629fe5e2f34ca6f9ed)
> Signed-off-by: Juerg Haefliger <juergh at canonical.com>
Acked-by: Stefan Bader <stefan.bader at canonical.com>
> ---
> drivers/block/nbd.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/block/nbd.c b/drivers/block/nbd.c
> index 673632c301dc..754b6fd9d2f4 100644
> --- a/drivers/block/nbd.c
> +++ b/drivers/block/nbd.c
> @@ -750,7 +750,7 @@ static int __nbd_ioctl(struct block_device *bdev, struct nbd_device *nbd,
>
> case NBD_SET_SIZE:
> return nbd_size_set(nbd, bdev, nbd->blksize,
> - arg / nbd->blksize);
> + div_s64(arg, nbd->blksize));
>
> case NBD_SET_SIZE_BLOCKS:
> return nbd_size_set(nbd, bdev, nbd->blksize, arg);
>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: OpenPGP digital signature
URL: <https://lists.ubuntu.com/archives/kernel-team/attachments/20180606/49eb3298/attachment.sig>
More information about the kernel-team
mailing list