summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdrian Bunk <bunk@stusta.de>2005-09-10 00:26:28 -0700
committerLinus Torvalds <torvalds@g5.osdl.org>2005-09-10 10:06:25 -0700
commit5ce7852cdf07ab903fb1c72d0915ac492c6e07c7 (patch)
tree7992224cd306be5e827de0bdf6255bc87a2bf4c8
parentdd81eca83c8300c95d8a1eaf0d38f56513711535 (diff)
downloadlinux-3.10-5ce7852cdf07ab903fb1c72d0915ac492c6e07c7.tar.gz
linux-3.10-5ce7852cdf07ab903fb1c72d0915ac492c6e07c7.tar.bz2
linux-3.10-5ce7852cdf07ab903fb1c72d0915ac492c6e07c7.zip
[PATCH] mm/filemap.c: make two functions static
With Nick Piggin <npiggin@suse.de> Give some things static scope. Signed-off-by: Adrian Bunk <bunk@stusta.de> Signed-off-by: Nick Piggin <npiggin@suse.de> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
-rw-r--r--include/linux/fs.h2
-rw-r--r--include/linux/writeback.h2
-rw-r--r--mm/filemap.c17
-rw-r--r--mm/memory.c2
4 files changed, 11 insertions, 12 deletions
diff --git a/include/linux/fs.h b/include/linux/fs.h
index 7f61227827d..e0b77c5af9a 100644
--- a/include/linux/fs.h
+++ b/include/linux/fs.h
@@ -1509,8 +1509,6 @@ extern void do_generic_mapping_read(struct address_space *mapping,
loff_t *, read_descriptor_t *, read_actor_t);
extern void
file_ra_state_init(struct file_ra_state *ra, struct address_space *mapping);
-extern ssize_t generic_file_direct_IO(int rw, struct kiocb *iocb,
- const struct iovec *iov, loff_t offset, unsigned long nr_segs);
extern ssize_t generic_file_readv(struct file *filp, const struct iovec *iov,
unsigned long nr_segs, loff_t *ppos);
ssize_t generic_file_writev(struct file *filp, const struct iovec *iov,
diff --git a/include/linux/writeback.h b/include/linux/writeback.h
index 542dbaee651..343d883d69c 100644
--- a/include/linux/writeback.h
+++ b/include/linux/writeback.h
@@ -109,8 +109,6 @@ int pdflush_operation(void (*fn)(unsigned long), unsigned long arg0);
int do_writepages(struct address_space *mapping, struct writeback_control *wbc);
int sync_page_range(struct inode *inode, struct address_space *mapping,
loff_t pos, size_t count);
-int sync_page_range_nolock(struct inode *inode, struct address_space
- *mapping, loff_t pos, size_t count);
/* pdflush.c */
extern int nr_pdflush_threads; /* Global so it can be exported to sysctl
diff --git a/mm/filemap.c b/mm/filemap.c
index 88611928e71..b5346576e58 100644
--- a/mm/filemap.c
+++ b/mm/filemap.c
@@ -37,6 +37,10 @@
#include <asm/uaccess.h>
#include <asm/mman.h>
+static ssize_t
+generic_file_direct_IO(int rw, struct kiocb *iocb, const struct iovec *iov,
+ loff_t offset, unsigned long nr_segs);
+
/*
* Shared mappings implemented 30.11.1994. It's not fully working yet,
* though.
@@ -301,8 +305,9 @@ EXPORT_SYMBOL(sync_page_range);
* as it forces O_SYNC writers to different parts of the same file
* to be serialised right until io completion.
*/
-int sync_page_range_nolock(struct inode *inode, struct address_space *mapping,
- loff_t pos, size_t count)
+static int sync_page_range_nolock(struct inode *inode,
+ struct address_space *mapping,
+ loff_t pos, size_t count)
{
pgoff_t start = pos >> PAGE_CACHE_SHIFT;
pgoff_t end = (pos + count - 1) >> PAGE_CACHE_SHIFT;
@@ -317,7 +322,6 @@ int sync_page_range_nolock(struct inode *inode, struct address_space *mapping,
ret = wait_on_page_writeback_range(mapping, start, end);
return ret;
}
-EXPORT_SYMBOL(sync_page_range_nolock);
/**
* filemap_fdatawait - walk the list of under-writeback pages of the given
@@ -2008,7 +2012,7 @@ generic_file_buffered_write(struct kiocb *iocb, const struct iovec *iov,
}
EXPORT_SYMBOL(generic_file_buffered_write);
-ssize_t
+static ssize_t
__generic_file_aio_write_nolock(struct kiocb *iocb, const struct iovec *iov,
unsigned long nr_segs, loff_t *ppos)
{
@@ -2108,7 +2112,7 @@ generic_file_aio_write_nolock(struct kiocb *iocb, const struct iovec *iov,
return ret;
}
-ssize_t
+static ssize_t
__generic_file_write_nolock(struct file *file, const struct iovec *iov,
unsigned long nr_segs, loff_t *ppos)
{
@@ -2229,7 +2233,7 @@ EXPORT_SYMBOL(generic_file_writev);
* Called under i_sem for writes to S_ISREG files. Returns -EIO if something
* went wrong during pagecache shootdown.
*/
-ssize_t
+static ssize_t
generic_file_direct_IO(int rw, struct kiocb *iocb, const struct iovec *iov,
loff_t offset, unsigned long nr_segs)
{
@@ -2264,4 +2268,3 @@ generic_file_direct_IO(int rw, struct kiocb *iocb, const struct iovec *iov,
}
return retval;
}
-EXPORT_SYMBOL_GPL(generic_file_direct_IO);
diff --git a/mm/memory.c b/mm/memory.c
index 788a6281034..ae8161f1f45 100644
--- a/mm/memory.c
+++ b/mm/memory.c
@@ -2225,7 +2225,7 @@ void update_mem_hiwater(struct task_struct *tsk)
#if !defined(__HAVE_ARCH_GATE_AREA)
#if defined(AT_SYSINFO_EHDR)
-struct vm_area_struct gate_vma;
+static struct vm_area_struct gate_vma;
static int __init gate_vma_init(void)
{