* Re: [ext4:dev 54/59] mm/truncate.c:751:6: error: redefinition of 'pagecache_isize_extended'
[not found] <542d494d.RV8pDLQ+fZWYT41u%fengguang.wu@intel.com>
@ 2014-10-02 13:37 ` Jan Kara
2014-10-03 16:38 ` Theodore Ts'o
0 siblings, 1 reply; 2+ messages in thread
From: Jan Kara @ 2014-10-02 13:37 UTC (permalink / raw)
To: kbuild test robot; +Cc: Jan Kara, Theodore Ts'o, kbuild-all, linux-fsdevel
[-- Attachment #1: Type: text/plain, Size: 2048 bytes --]
Hello,
On Thu 02-10-14 20:47:09, Wu Fengguang wrote:
> tree: git://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4.git dev
> head: c13e87d490d31f08cb91452aec787e1c531450bc
> commit: ac4dd23b76ce3ad4e1f473e8414ef1723d8edfff [54/59] vfs: fix data corruption when blocksize < pagesize for mmaped data
> config: blackfin-TCM-BF537_defconfig (attached as .config)
> reproduce:
> wget https://git.kernel.org/cgit/linux/kernel/git/wfg/lkp-tests.git/plain/sbin/make.cross -O ~/bin/make.cross
> chmod +x ~/bin/make.cross
> git checkout ac4dd23b76ce3ad4e1f473e8414ef1723d8edfff
> # save the attached .config to linux build tree
> make.cross ARCH=blackfin
>
> All error/warnings:
>
> >> mm/truncate.c:751:6: error: redefinition of 'pagecache_isize_extended'
> include/linux/mm.h:1161:91: note: previous definition of 'pagecache_isize_extended' was here
Ah, this is !CONFIG_MMU. I forgot to test that. Given page_mkclean() now
works for !CONFIG_MMU systems just fine (does nothing) we can just remove
the CONFIG_MMU test from mm.h. !CONFIG_MMU archs will then do some
pointless page lookups but I guess we can live with that.
Patch is attached.
Honza
>
> vim +/pagecache_isize_extended +751 mm/truncate.c
>
> 745 * The function must be called after i_size is updated so that page fault
> 746 * coming after we unlock the page will already see the new i_size.
> 747 * The function must be called while we still hold i_mutex - this not only
> 748 * makes sure i_size is stable but also that userspace cannot observe new
> 749 * i_size value before we are prepared to store mmap writes at new inode size.
> 750 */
> > 751 void pagecache_isize_extended(struct inode *inode, loff_t from, loff_t to)
> 752 {
> 753 int bsize = 1 << inode->i_blkbits;
> 754 loff_t rounded_from;
>
> ---
> 0-DAY kernel build testing backend Open Source Technology Center
> http://lists.01.org/mailman/listinfo/kbuild Intel Corporation
--
Jan Kara <jack@suse.cz>
SUSE Labs, CR
[-- Attachment #2: 0001-mm-Fixup-pagecache_isize_extended-definitions-for-CO.patch --]
[-- Type: text/x-patch, Size: 1562 bytes --]
>From eabe5dd5fd0ac36be2aa1b5a5ab844a15dac8777 Mon Sep 17 00:00:00 2001
From: Jan Kara <jack@suse.cz>
Date: Thu, 2 Oct 2014 15:31:24 +0200
Subject: [PATCH] mm: Fixup pagecache_isize_extended() definitions for
!CONFIG_MMU
For !CONFIG_MMU systems we defined pagecache_isize_extended() in both
include/linux/mm.h and mm/truncate.c which causes compilation error.
Although pagecache_isize_extended() doesn't do anything useful for
!CONFIG_MMU systems, it could do something in future and it's overhead
isn't huge. So don't try to be too smart and remove !CONFIG_MMU
definition of pagecache_isize_extended().
Signed-off-by: Jan Kara <jack@suse.cz>
---
include/linux/mm.h | 7 -------
1 file changed, 7 deletions(-)
diff --git a/include/linux/mm.h b/include/linux/mm.h
index f0e53e5a3b17..5005464fe012 100644
--- a/include/linux/mm.h
+++ b/include/linux/mm.h
@@ -1155,14 +1155,7 @@ static inline void unmap_shared_mapping_range(struct address_space *mapping,
extern void truncate_pagecache(struct inode *inode, loff_t new);
extern void truncate_setsize(struct inode *inode, loff_t newsize);
-#ifdef CONFIG_MMU
void pagecache_isize_extended(struct inode *inode, loff_t from, loff_t to);
-#else
-static inline void pagecache_isize_extended(struct inode *inode, loff_t from,
- loff_t to)
-{
-}
-#endif
void truncate_pagecache_range(struct inode *inode, loff_t offset, loff_t end);
int truncate_inode_page(struct address_space *mapping, struct page *page);
int generic_error_remove_page(struct address_space *mapping, struct page *page);
--
1.8.1.4
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [ext4:dev 54/59] mm/truncate.c:751:6: error: redefinition of 'pagecache_isize_extended'
2014-10-02 13:37 ` [ext4:dev 54/59] mm/truncate.c:751:6: error: redefinition of 'pagecache_isize_extended' Jan Kara
@ 2014-10-03 16:38 ` Theodore Ts'o
0 siblings, 0 replies; 2+ messages in thread
From: Theodore Ts'o @ 2014-10-03 16:38 UTC (permalink / raw)
To: Jan Kara; +Cc: kbuild test robot, kbuild-all, linux-fsdevel
thanks, I've folded this into the original patch so as to avoid git
bisect breakage for !CONFIG_MMU builders.
- Ted
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2014-10-03 16:39 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <542d494d.RV8pDLQ+fZWYT41u%fengguang.wu@intel.com>
2014-10-02 13:37 ` [ext4:dev 54/59] mm/truncate.c:751:6: error: redefinition of 'pagecache_isize_extended' Jan Kara
2014-10-03 16:38 ` Theodore Ts'o
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).