From abdcef47d2ef9f38092bcfd3e4a8ec5499244826 Mon Sep 17 00:00:00 2001 From: hpingfs <101400146+hpingfs@users.noreply.github.com> Date: Thu, 31 Mar 2022 06:39:55 +0800 Subject: zvol_os: suppress compiler warning for zvol_open_timeout_ms When HAVE_BLKDEV_GET_ERESTARTSYS is defined, compiler will complain "defined but not used" warning for zvol_open_timeout_ms. Reviewed-by: Brian Behlendorf Signed-off-by: Ping Huang Closes #13270 --- module/os/linux/zfs/zvol_os.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/module/os/linux/zfs/zvol_os.c b/module/os/linux/zfs/zvol_os.c index c964cce0d..d30f01f4b 100644 --- a/module/os/linux/zfs/zvol_os.c +++ b/module/os/linux/zfs/zvol_os.c @@ -46,7 +46,10 @@ static unsigned int zvol_request_sync = 0; static unsigned int zvol_prefetch_bytes = (128 * 1024); static unsigned long zvol_max_discard_blocks = 16384; static unsigned int zvol_threads = 32; + +#ifndef HAVE_BLKDEV_GET_ERESTARTSYS static const unsigned int zvol_open_timeout_ms = 1000; +#endif struct zvol_state_os { struct gendisk *zvo_disk; /* generic disk */ -- cgit v1.2.3