[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20190718125509.775525-1-arnd@arndb.de>
Date: Thu, 18 Jul 2019 14:55:01 +0200
From: Arnd Bergmann <arnd@...db.de>
To: Christoph Hellwig <hch@...radead.org>,
"Darrick J. Wong" <darrick.wong@...cle.com>,
linux-xfs@...r.kernel.org, linux-fsdevel@...r.kernel.org
Cc: Arnd Bergmann <arnd@...db.de>, Christoph Hellwig <hch@....de>,
Andreas Gruenbacher <agruenba@...hat.com>,
Hannes Reinecke <hare@...e.com>,
Souptick Joarder <jrdr.linux@...il.com>,
linux-kernel@...r.kernel.org
Subject: [PATCH] iomap: hide iomap_sector with CONFIG_BLOCK=n
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@...db.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
Powered by blists - more mailing lists