From: Arnd Bergmann <arnd@arndb.de>
To: Christoph Hellwig <hch@infradead.org>,
"Darrick J. Wong" <darrick.wong@oracle.com>,
linux-xfs@vger.kernel.org, linux-fsdevel@vger.kernel.org
Cc: Arnd Bergmann <arnd@arndb.de>, Christoph Hellwig <hch@lst.de>,
Andreas Gruenbacher <agruenba@redhat.com>,
Hannes Reinecke <hare@suse.com>,
Souptick Joarder <jrdr.linux@gmail.com>,
linux-kernel@vger.kernel.org
Subject: [PATCH] iomap: hide iomap_sector with CONFIG_BLOCK=n
Date: Thu, 18 Jul 2019 14:55:01 +0200 [thread overview]
Message-ID: <20190718125509.775525-1-arnd@arndb.de> (raw)
When CONFIG_BLOCK is disabled, SECTOR_SHIFT is unknown:
In file included from <built-in>:3:
include/linux/iomap.h:76:48: error: use of undeclared identifier 'SECTOR_SHIFT'
return (iomap->addr + pos - iomap->offset) >> SECTOR_SHIFT;
Since there are no callers in this case, just hide the function in
the same ifdef.
Fixes: db074436f421 ("iomap: move the direct IO code into a separate file")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
include/linux/iomap.h | 2 ++
1 file changed, 2 insertions(+)
diff --git a/include/linux/iomap.h b/include/linux/iomap.h
index bc499ceae392..bb07f31e3b6f 100644
--- a/include/linux/iomap.h
+++ b/include/linux/iomap.h
@@ -70,11 +70,13 @@ struct iomap {
const struct iomap_page_ops *page_ops;
};
+#ifdef CONFIG_BLOCK
static inline sector_t
iomap_sector(struct iomap *iomap, loff_t pos)
{
return (iomap->addr + pos - iomap->offset) >> SECTOR_SHIFT;
}
+#endif
/*
* When a filesystem sets page_ops in an iomap mapping it returns, page_prepare
--
2.20.0
next reply other threads:[~2019-07-18 12:56 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-07-18 12:55 Arnd Bergmann [this message]
2019-07-18 12:57 ` Christoph Hellwig
2019-07-18 13:03 ` Arnd Bergmann
2019-07-18 13:08 ` Christoph Hellwig
2019-07-18 14:25 ` Darrick J. Wong
2019-07-19 2:19 ` Masahiro Yamada
2019-07-19 2:24 ` Randy Dunlap
2019-07-19 2:32 ` Masahiro Yamada
2019-07-19 5:58 ` Christoph Hellwig
2019-07-19 6:16 ` Masahiro Yamada
2019-07-19 6:19 ` Christoph Hellwig
2019-07-18 14:48 ` Arnd Bergmann
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20190718125509.775525-1-arnd@arndb.de \
--to=arnd@arndb.de \
--cc=agruenba@redhat.com \
--cc=darrick.wong@oracle.com \
--cc=hare@suse.com \
--cc=hch@infradead.org \
--cc=hch@lst.de \
--cc=jrdr.linux@gmail.com \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-xfs@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®