]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
mm: remove shmem_mapping() shmem_zero_setup() duplicates
authorHugh Dickins <hughd@google.com>
Fri, 24 Feb 2017 22:59:36 +0000 (14:59 -0800)
committerLinus Torvalds <torvalds@linux-foundation.org>
Sat, 25 Feb 2017 01:46:56 +0000 (17:46 -0800)
Remove the prototypes for shmem_mapping() and shmem_zero_setup() from
linux/mm.h, since they are already provided in linux/shmem_fs.h.  But
shmem_fs.h must then provide the inline stub for shmem_mapping() when
CONFIG_SHMEM is not set, and a few more cfiles now need to #include it.

Link: http://lkml.kernel.org/r/alpine.LSU.2.11.1702081658250.1549@eggly.anvils
Signed-off-by: Hugh Dickins <hughd@google.com>
Cc: Johannes Weiner <hannes@cmpxchg.org>
Cc: Michal Simek <monstr@monstr.eu>
Cc: Michael Ellerman <mpe@ellerman.id.au>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
arch/microblaze/pci/pci-common.c
arch/powerpc/kernel/pci-common.c
include/linux/mm.h
include/linux/shmem_fs.h
mm/madvise.c
mm/memcontrol.c
mm/mincore.c
mm/truncate.c
mm/workingset.c

index 7f696f97f9ddc1828807bbab0bcd0e89161b0deb..13bc93242c0c571c71dc4afe5a7947a47bd7051d 100644 (file)
@@ -22,6 +22,7 @@
 #include <linux/init.h>
 #include <linux/bootmem.h>
 #include <linux/mm.h>
+#include <linux/shmem_fs.h>
 #include <linux/list.h>
 #include <linux/syscalls.h>
 #include <linux/irq.h>
index 74bec549897202e797b2f0c7de30ad7d83ed9cfb..a3f5334f5d8cfa46da9f0cbfa6b976dd4ed77950 100644 (file)
@@ -25,6 +25,7 @@
 #include <linux/of_address.h>
 #include <linux/of_pci.h>
 #include <linux/mm.h>
+#include <linux/shmem_fs.h>
 #include <linux/list.h>
 #include <linux/syscalls.h>
 #include <linux/irq.h>
index ed233b002e33be9eac6f10e0952e9d537690c683..0d65dd72c0f49e230613ac268d29c7b377962836 100644 (file)
@@ -1168,16 +1168,6 @@ extern void pagefault_out_of_memory(void);
 
 extern void show_free_areas(unsigned int flags, nodemask_t *nodemask);
 
-int shmem_zero_setup(struct vm_area_struct *);
-#ifdef CONFIG_SHMEM
-bool shmem_mapping(struct address_space *mapping);
-#else
-static inline bool shmem_mapping(struct address_space *mapping)
-{
-       return false;
-}
-#endif
-
 extern bool can_do_mlock(void);
 extern int user_shm_lock(size_t, struct user_struct *);
 extern void user_shm_unlock(size_t, struct user_struct *);
index fdaac9d4d46d28a4106ef7295e1ced78bfda9afb..a7d6bd2a918f73a71abcc2daf92fb412c22ac342 100644 (file)
@@ -57,7 +57,14 @@ extern int shmem_zero_setup(struct vm_area_struct *);
 extern unsigned long shmem_get_unmapped_area(struct file *, unsigned long addr,
                unsigned long len, unsigned long pgoff, unsigned long flags);
 extern int shmem_lock(struct file *file, int lock, struct user_struct *user);
+#ifdef CONFIG_SHMEM
 extern bool shmem_mapping(struct address_space *mapping);
+#else
+static inline bool shmem_mapping(struct address_space *mapping)
+{
+       return false;
+}
+#endif /* CONFIG_SHMEM */
 extern void shmem_unlock_mapping(struct address_space *mapping);
 extern struct page *shmem_read_mapping_page_gfp(struct address_space *mapping,
                                        pgoff_t index, gfp_t gfp_mask);
index 11fc65f81ecd087d356d698367e7189cc7832eb8..dc5927c812d3d1f9a209fbdbea3a36a61cbde17d 100644 (file)
@@ -21,6 +21,7 @@
 #include <linux/backing-dev.h>
 #include <linux/swap.h>
 #include <linux/swapops.h>
+#include <linux/shmem_fs.h>
 #include <linux/mmu_notifier.h>
 
 #include <asm/tlb.h>
index 1fd6affcdde7cfdff2c768f99ead14c62624371f..45867e439d31d7f9836769463cad10b170180558 100644 (file)
@@ -35,6 +35,7 @@
 #include <linux/memcontrol.h>
 #include <linux/cgroup.h>
 #include <linux/mm.h>
+#include <linux/shmem_fs.h>
 #include <linux/hugetlb.h>
 #include <linux/pagemap.h>
 #include <linux/smp.h>
index ddb872da3f5b065e11937ed5b236643731d24a3c..c5687c45c326b3280c7bb7147a5796a8cd80b68d 100644 (file)
@@ -14,6 +14,7 @@
 #include <linux/syscalls.h>
 #include <linux/swap.h>
 #include <linux/swapops.h>
+#include <linux/shmem_fs.h>
 #include <linux/hugetlb.h>
 
 #include <linux/uaccess.h>
index dd7b24e083c5b1f76851eb0b5e3359dde92d910e..f2db67465495c05ea64d8725e1962b38d541079b 100644 (file)
@@ -20,6 +20,7 @@
 #include <linux/task_io_accounting_ops.h>
 #include <linux/buffer_head.h> /* grr. try_to_release_page,
                                   do_invalidatepage */
+#include <linux/shmem_fs.h>
 #include <linux/cleancache.h>
 #include <linux/rmap.h>
 #include "internal.h"
index a67f5796b9951b617334a54adf06869bdc537f47..79ed5364375d3385824091b7a0d944e2f22539f7 100644 (file)
@@ -6,6 +6,7 @@
 
 #include <linux/memcontrol.h>
 #include <linux/writeback.h>
+#include <linux/shmem_fs.h>
 #include <linux/pagemap.h>
 #include <linux/atomic.h>
 #include <linux/module.h>