All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] ext2: fix FS_IOMAP dependency
@ 2018-02-28 13:36 Arnd Bergmann
  2018-02-28 16:28 ` Jan Kara
  0 siblings, 1 reply; 2+ messages in thread
From: Arnd Bergmann @ 2018-02-28 13:36 UTC (permalink / raw)
  To: Jan Kara
  Cc: Arnd Bergmann, Dan Williams, Ernesto A. Fernández,
	Andreas Dilger, Andreas Gruenbacher, Tejun Heo, linux-ext4,
	linux-kernel

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

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] ext2: fix FS_IOMAP dependency
  2018-02-28 13:36 [PATCH] ext2: fix FS_IOMAP dependency Arnd Bergmann
@ 2018-02-28 16:28 ` Jan Kara
  0 siblings, 0 replies; 2+ messages in thread
From: Jan Kara @ 2018-02-28 16:28 UTC (permalink / raw)
  To: Arnd Bergmann
  Cc: Jan Kara, Dan Williams, Ernesto A. Fernández,
	Andreas Dilger, Andreas Gruenbacher, Tejun Heo, linux-ext4,
	linux-kernel

On Wed 28-02-18 14:36:46, Arnd Bergmann wrote:
> 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>

Thanks for the patch but Dan's patches [1] deal with a breakage like this
in a more complete way so I'd prefer to go with his full series...

								Honza

[1] https://lkml.org/lkml/2018/2/26/1323

> ---
>  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
> 
> 
-- 
Jan Kara <jack@suse.com>
SUSE Labs, CR

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2018-02-28 16:28 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-02-28 13:36 [PATCH] ext2: fix FS_IOMAP dependency Arnd Bergmann
2018-02-28 16:28 ` Jan Kara

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.