diff --git a/drivers/block/nbd.c b/drivers/block/nbd.c index f6b51d76e578d9a489983e8db7ab78827de7104d..08afbc7a2bb87171a2c4255c74705d39dd7a2b94 100644 --- a/drivers/block/nbd.c +++ b/drivers/block/nbd.c @@ -753,8 +753,7 @@ static int __nbd_ioctl(struct block_device *bdev, struct nbd_device *nbd, } case NBD_SET_BLKSIZE: { - loff_t bsize = nbd->bytesize; - do_div(bsize, arg); + loff_t bsize = div_s64(nbd->bytesize, arg); return nbd_size_set(nbd, bdev, arg, bsize); }