Skip to content
Commit 5e454c67 authored by Arnd Bergmann's avatar Arnd Bergmann Committed by Jens Axboe
Browse files

nbd: use correct div_s64 helper



The do_div() macro now checks its arguments for the correct type,
and refuses anything other than u64, so we get a warning about
nbd_ioctl passing in an loff_t:

drivers/block/nbd.c: In function '__nbd_ioctl':
drivers/block/nbd.c:757:77: error: comparison of distinct pointer types lacks a cast [-Werror]

This changes the nbd code to use div_s64() instead, which takes
a signed argument.

Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
Fixes: 37091fdd ("nbd: Create size change events for userspace")
Signed-off-by: default avatarJens Axboe <axboe@fb.com>
parent 90beb2e7
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment