summaryrefslogtreecommitdiff
path: root/drivers/block
diff options
context:
space:
mode:
authorJens Axboe <axboe@fb.com>2016-12-03 22:08:03 +0300
committerJens Axboe <axboe@fb.com>2016-12-03 22:08:03 +0300
commite88f72cb9f54f6d244e55f629fe5e2f34ca6f9ed (patch)
tree6c1e55ce9cf10d0e133c6b1e666dd94783f067fa /drivers/block
parentef77b515243b3499d62cf446eda6ca7e0a0b079c (diff)
downloadlinux-e88f72cb9f54f6d244e55f629fe5e2f34ca6f9ed.tar.xz
nbd: fix 64-bit division
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@fb.com>
Diffstat (limited to 'drivers/block')
-rw-r--r--drivers/block/nbd.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/block/nbd.c b/drivers/block/nbd.c
index 92f5400edbd3..bc78cbb2d18a 100644
--- a/drivers/block/nbd.c
+++ b/drivers/block/nbd.c
@@ -729,7 +729,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);