* [PATCH] vfs: fix compilation for no-MMU configurations
@ 2014-10-05 8:58 Uwe Kleine-König
2014-10-06 9:25 ` Jan Kara
0 siblings, 1 reply; 2+ messages in thread
From: Uwe Kleine-König @ 2014-10-05 8:58 UTC (permalink / raw)
To: Jan Kara, Theodore Ts'o; +Cc: kernel, linux-fsdevel, linux-mm, linux-ext4
Commit ac4dd23b76ce introduced a new function pagecache_isize_extended.
In <linux/mm.h> it was declared static inline and empty for no-MMU and
defined unconditionally in mm/truncate.c which results a compiler
error:
CC mm/truncate.o
mm/truncate.c:751:6: error: redefinition of 'pagecache_isize_extended'
void pagecache_isize_extended(struct inode *inode, loff_t from, loff_t to)
^
In file included from mm/truncate.c:13:0:
include/linux/mm.h:1161:91: note: previous definition of 'pagecache_isize_extended' was here
static inline void pagecache_isize_extended(struct inode *inode, loff_t from,
^
scripts/Makefile.build:257: recipe for target 'mm/truncate.o' failed
(tested with ARCH=arm efm32_defconfig).
Fixes: ac4dd23b76ce ("vfs: fix data corruption when blocksize < pagesize for mmaped data")
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
Hello,
the bad commit sits in
git://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4.git#dev
and is included in next.
Best regards
Uwe
mm/truncate.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/mm/truncate.c b/mm/truncate.c
index 261eaf6e5a19..0d9c4ebd5ecc 100644
--- a/mm/truncate.c
+++ b/mm/truncate.c
@@ -729,6 +729,7 @@ void truncate_setsize(struct inode *inode, loff_t newsize)
}
EXPORT_SYMBOL(truncate_setsize);
+#ifdef CONFIG_MMU
/**
* pagecache_isize_extended - update pagecache after extension of i_size
* @inode: inode for which i_size was extended
@@ -780,6 +781,7 @@ void pagecache_isize_extended(struct inode *inode, loff_t from, loff_t to)
page_cache_release(page);
}
EXPORT_SYMBOL(pagecache_isize_extended);
+#endif
/**
* truncate_pagecache_range - unmap and remove pagecache that is hole-punched
--
2.1.0
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] vfs: fix compilation for no-MMU configurations
2014-10-05 8:58 [PATCH] vfs: fix compilation for no-MMU configurations Uwe Kleine-König
@ 2014-10-06 9:25 ` Jan Kara
0 siblings, 0 replies; 2+ messages in thread
From: Jan Kara @ 2014-10-06 9:25 UTC (permalink / raw)
To: Uwe Kleine-König
Cc: Jan Kara, Theodore Ts'o, kernel, linux-fsdevel, linux-mm,
linux-ext4
On Sun 05-10-14 10:58:36, Uwe Kleine-König wrote:
> Commit ac4dd23b76ce introduced a new function pagecache_isize_extended.
> In <linux/mm.h> it was declared static inline and empty for no-MMU and
> defined unconditionally in mm/truncate.c which results a compiler
> error:
>
> CC mm/truncate.o
> mm/truncate.c:751:6: error: redefinition of 'pagecache_isize_extended'
> void pagecache_isize_extended(struct inode *inode, loff_t from, loff_t to)
> ^
> In file included from mm/truncate.c:13:0:
> include/linux/mm.h:1161:91: note: previous definition of 'pagecache_isize_extended' was here
> static inline void pagecache_isize_extended(struct inode *inode, loff_t from,
> ^
> scripts/Makefile.build:257: recipe for target 'mm/truncate.o' failed
>
> (tested with ARCH=arm efm32_defconfig).
>
> Fixes: ac4dd23b76ce ("vfs: fix data corruption when blocksize < pagesize for mmaped data")
> Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Yeah, sorry for the breakage. It should be already fixed in Ted's tree.
I've actually chosen to just remove the inline definition. It is true that
currently the function doesn't need to do anything for systems not
supporting mmap but that may change in future and the functions is
reasonably cheap anyway...
Honza
> ---
> Hello,
>
> the bad commit sits in
>
> git://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4.git#dev
>
> and is included in next.
>
> Best regards
> Uwe
>
> mm/truncate.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/mm/truncate.c b/mm/truncate.c
> index 261eaf6e5a19..0d9c4ebd5ecc 100644
> --- a/mm/truncate.c
> +++ b/mm/truncate.c
> @@ -729,6 +729,7 @@ void truncate_setsize(struct inode *inode, loff_t newsize)
> }
> EXPORT_SYMBOL(truncate_setsize);
>
> +#ifdef CONFIG_MMU
> /**
> * pagecache_isize_extended - update pagecache after extension of i_size
> * @inode: inode for which i_size was extended
> @@ -780,6 +781,7 @@ void pagecache_isize_extended(struct inode *inode, loff_t from, loff_t to)
> page_cache_release(page);
> }
> EXPORT_SYMBOL(pagecache_isize_extended);
> +#endif
>
> /**
> * truncate_pagecache_range - unmap and remove pagecache that is hole-punched
> --
> 2.1.0
>
--
Jan Kara <jack@suse.cz>
SUSE Labs, CR
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2014-10-06 9:25 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-10-05 8:58 [PATCH] vfs: fix compilation for no-MMU configurations Uwe Kleine-König
2014-10-06 9:25 ` Jan Kara
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).