diff options
author | hpingfs <[email protected]> | 2022-03-31 06:39:55 +0800 |
---|---|---|
committer | GitHub <[email protected]> | 2022-03-30 15:39:55 -0700 |
commit | abdcef47d2ef9f38092bcfd3e4a8ec5499244826 (patch) | |
tree | 893f09399a29e77b055537d6d70d5c1f8f0a1fad | |
parent | 7dc782e5c557cb0bbcd509cc92c22a3b5bf4c500 (diff) |
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 <[email protected]>
Signed-off-by: Ping Huang <[email protected]>
Closes #13270
-rw-r--r-- | module/os/linux/zfs/zvol_os.c | 3 |
1 files changed, 3 insertions, 0 deletions
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 */ |