linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Arnd Bergmann <arnd@arndb.de>
To: Jan Kara <jack@suse.com>
Cc: "Arnd Bergmann" <arnd@arndb.de>,
	"Dan Williams" <dan.j.williams@intel.com>,
	"Ernesto A. Fernández" <ernesto.mnd.fernandez@gmail.com>,
	"Andreas Dilger" <adilger@dilger.ca>,
	"Andreas Gruenbacher" <agruenba@redhat.com>,
	"Tejun Heo" <tj@kernel.org>,
	linux-ext4@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH] ext2: fix FS_IOMAP dependency
Date: Wed, 28 Feb 2018 14:36:46 +0100	[thread overview]
Message-ID: <20180228133659.1933887-1-arnd@arndb.de> (raw)

I ran into a randconfig link error on next-20180228 that appears to have
been caused by an older patch:

fs/ext2/inode.o: In function `ext2_setattr':
inode.c:(.text+0x19eb): undefined reference to `iomap_zero_range'

This adds a compile-time conditional around the code path so the
compiler can optimize out the reference in configurations that don't
need it anyway.

Fixes: 00697eed386d ("ext2: use iomap_zero_range() for zeroing truncated page in DAX path")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 fs/ext2/inode.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/fs/ext2/inode.c b/fs/ext2/inode.c
index 5d5e9f7b98d6..6e6db0ab3bd6 100644
--- a/fs/ext2/inode.c
+++ b/fs/ext2/inode.c
@@ -1296,7 +1296,7 @@ static int ext2_setsize(struct inode *inode, loff_t newsize)
 
 	inode_dio_wait(inode);
 
-	if (IS_DAX(inode)) {
+	if (IS_ENABLED(CONFIG_FS_DAX) && IS_DAX(inode)) {
 		error = iomap_zero_range(inode, newsize,
 					 PAGE_ALIGN(newsize) - newsize, NULL,
 					 &ext2_iomap_ops);
-- 
2.9.0

             reply	other threads:[~2018-02-28 13:37 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-02-28 13:36 Arnd Bergmann [this message]
2018-02-28 16:28 ` [PATCH] ext2: fix FS_IOMAP dependency Jan Kara

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=20180228133659.1933887-1-arnd@arndb.de \
    --to=arnd@arndb.de \
    --cc=adilger@dilger.ca \
    --cc=agruenba@redhat.com \
    --cc=dan.j.williams@intel.com \
    --cc=ernesto.mnd.fernandez@gmail.com \
    --cc=jack@suse.com \
    --cc=linux-ext4@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=tj@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;
as well as URLs for NNTP newsgroup(s).