From ae46ba9186e8849b6b82ff09a085a07bcc55dcc0 Mon Sep 17 00:00:00 2001 From: Nicolas Droux Date: Tue, 8 Aug 2017 16:54:48 -0600 Subject: [PATCH] dtrace: IO provider unused variables when DTrace is disabled Fix unused variables warnings caused by IO provider probes when CONFIG_DTRACE is not set. Orabug: 26570995 Signed-off-by: Nicolas Droux Acked-by: Nick Alcock Reviewed-by: Alan Maguire --- fs/nfs/internal.h | 2 +- fs/xfs/xfs_buf.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/fs/nfs/internal.h b/fs/nfs/internal.h index 12efee9cdede..7740e81c5c05 100644 --- a/fs/nfs/internal.h +++ b/fs/nfs/internal.h @@ -685,7 +685,7 @@ static inline u32 nfs_fhandle_hash(const struct nfs_fh *fh) #define DTRACE_IO_NFS(name, rw, size, inode) \ if (DTRACE_IO_ENABLED(name)) { \ - struct bio bio = { \ + struct bio bio __maybe_unused = { \ .bi_rw = rw, \ .bi_flags = (1 << BIO_USER_MAPPED), \ .bi_iter.bi_size = size, \ diff --git a/fs/xfs/xfs_buf.c b/fs/xfs/xfs_buf.c index bb92da29b2c3..13b71f2d2c5d 100644 --- a/fs/xfs/xfs_buf.c +++ b/fs/xfs/xfs_buf.c @@ -59,7 +59,7 @@ static kmem_zone_t *xfs_buf_zone; #define DTRACE_IO_XFS_WAIT(name, bp) \ if (DTRACE_IO_ENABLED(name)) { \ - struct bio bio = { \ + struct bio bio __maybe_unused = { \ .bi_iter.bi_sector = (bp)->b_bn, \ .bi_iter.bi_size = (bp)->b_length, \ .bi_rw = ((bp)->b_flags & XBF_WRITE) != 0, \ -- 2.50.1