Commit 15a37ba2 authored by Andrew Morton's avatar Andrew Morton Committed by Linus Torvalds

[PATCH] inline generic_writepages()

generic_writepages() is just a wrapper around mpage_writepages(), so
inline it.
parent 3d4ed856
...@@ -20,6 +20,7 @@ ...@@ -20,6 +20,7 @@
#include <linux/module.h> #include <linux/module.h>
#include <linux/blkpg.h> #include <linux/blkpg.h>
#include <linux/buffer_head.h> #include <linux/buffer_head.h>
#include <linux/mpage.h>
#include <asm/uaccess.h> #include <asm/uaccess.h>
......
...@@ -461,7 +461,6 @@ extern int filemap_sync(struct vm_area_struct *, unsigned long, size_t, unsigned ...@@ -461,7 +461,6 @@ extern int filemap_sync(struct vm_area_struct *, unsigned long, size_t, unsigned
extern struct page *filemap_nopage(struct vm_area_struct *, unsigned long, int); extern struct page *filemap_nopage(struct vm_area_struct *, unsigned long, int);
/* mm/page-writeback.c */ /* mm/page-writeback.c */
int generic_writepages(struct address_space *mapping, int *nr_to_write);
int write_one_page(struct page *page, int wait); int write_one_page(struct page *page, int wait);
/* readahead.c */ /* readahead.c */
......
...@@ -16,3 +16,8 @@ int mpage_readpage(struct page *page, get_block_t get_block); ...@@ -16,3 +16,8 @@ int mpage_readpage(struct page *page, get_block_t get_block);
int mpage_writepages(struct address_space *mapping, int mpage_writepages(struct address_space *mapping,
int *nr_to_write, get_block_t get_block); int *nr_to_write, get_block_t get_block);
static inline int
generic_writepages(struct address_space *mapping, int *nr_to_write)
{
return mpage_writepages(mapping, nr_to_write, NULL);
}
...@@ -316,12 +316,6 @@ int generic_vm_writeback(struct page *page, int *nr_to_write) ...@@ -316,12 +316,6 @@ int generic_vm_writeback(struct page *page, int *nr_to_write)
} }
EXPORT_SYMBOL(generic_vm_writeback); EXPORT_SYMBOL(generic_vm_writeback);
int generic_writepages(struct address_space *mapping, int *nr_to_write)
{
return mpage_writepages(mapping, nr_to_write, NULL);
}
EXPORT_SYMBOL(generic_writepages);
int do_writepages(struct address_space *mapping, int *nr_to_write) int do_writepages(struct address_space *mapping, int *nr_to_write)
{ {
if (mapping->a_ops->writepages) if (mapping->a_ops->writepages)
......
...@@ -17,6 +17,7 @@ ...@@ -17,6 +17,7 @@
#include <linux/bio.h> #include <linux/bio.h>
#include <linux/swapops.h> #include <linux/swapops.h>
#include <linux/buffer_head.h> /* for block_sync_page() */ #include <linux/buffer_head.h> /* for block_sync_page() */
#include <linux/mpage.h>
#include <asm/pgtable.h> #include <asm/pgtable.h>
static struct bio * static struct bio *
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment