Re: [ext4:dev 54/59] mm/truncate.c:751:6: error: redefinition of 'pagecache_isize_extended'

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



  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@xxxxxxx>
SUSE Labs, CR
>From eabe5dd5fd0ac36be2aa1b5a5ab844a15dac8777 Mon Sep 17 00:00:00 2001
From: Jan Kara <jack@xxxxxxx>
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@xxxxxxx>
---
 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


[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [Samba]     [Device Mapper]     [CEPH Development]
  Powered by Linux