diff options
Diffstat (limited to 'mm')
| -rw-r--r-- | mm/filemap.c | 17 | ||||
| -rw-r--r-- | mm/memory.c | 2 | ||||
| -rw-r--r-- | mm/oom_kill.c | 3 | ||||
| -rw-r--r-- | mm/page_alloc.c | 2 | ||||
| -rw-r--r-- | mm/slab.c | 4 | ||||
| -rw-r--r-- | mm/swap_state.c | 4 | ||||
| -rw-r--r-- | mm/swapfile.c | 3 |
7 files changed, 18 insertions, 17 deletions
diff --git a/mm/filemap.c b/mm/filemap.c index 88611928e71f..b5346576e58d 100644 --- a/mm/filemap.c +++ b/mm/filemap.c | |||
| @@ -37,6 +37,10 @@ | |||
| 37 | #include <asm/uaccess.h> | 37 | #include <asm/uaccess.h> |
| 38 | #include <asm/mman.h> | 38 | #include <asm/mman.h> |
| 39 | 39 | ||
| 40 | static ssize_t | ||
| 41 | generic_file_direct_IO(int rw, struct kiocb *iocb, const struct iovec *iov, | ||
| 42 | loff_t offset, unsigned long nr_segs); | ||
| 43 | |||
| 40 | /* | 44 | /* |
| 41 | * Shared mappings implemented 30.11.1994. It's not fully working yet, | 45 | * Shared mappings implemented 30.11.1994. It's not fully working yet, |
| 42 | * though. | 46 | * though. |
| @@ -301,8 +305,9 @@ EXPORT_SYMBOL(sync_page_range); | |||
| 301 | * as it forces O_SYNC writers to different parts of the same file | 305 | * as it forces O_SYNC writers to different parts of the same file |
| 302 | * to be serialised right until io completion. | 306 | * to be serialised right until io completion. |
| 303 | */ | 307 | */ |
| 304 | int sync_page_range_nolock(struct inode *inode, struct address_space *mapping, | 308 | static int sync_page_range_nolock(struct inode *inode, |
| 305 | loff_t pos, size_t count) | 309 | struct address_space *mapping, |
| 310 | loff_t pos, size_t count) | ||
| 306 | { | 311 | { |
| 307 | pgoff_t start = pos >> PAGE_CACHE_SHIFT; | 312 | pgoff_t start = pos >> PAGE_CACHE_SHIFT; |
| 308 | pgoff_t end = (pos + count - 1) >> PAGE_CACHE_SHIFT; | 313 | 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, | |||
| 317 | ret = wait_on_page_writeback_range(mapping, start, end); | 322 | ret = wait_on_page_writeback_range(mapping, start, end); |
| 318 | return ret; | 323 | return ret; |
| 319 | } | 324 | } |
| 320 | EXPORT_SYMBOL(sync_page_range_nolock); | ||
| 321 | 325 | ||
| 322 | /** | 326 | /** |
| 323 | * filemap_fdatawait - walk the list of under-writeback pages of the given | 327 | * 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, | |||
| 2008 | } | 2012 | } |
| 2009 | EXPORT_SYMBOL(generic_file_buffered_write); | 2013 | EXPORT_SYMBOL(generic_file_buffered_write); |
| 2010 | 2014 | ||
| 2011 | ssize_t | 2015 | static ssize_t |
| 2012 | __generic_file_aio_write_nolock(struct kiocb *iocb, const struct iovec *iov, | 2016 | __generic_file_aio_write_nolock(struct kiocb *iocb, const struct iovec *iov, |
| 2013 | unsigned long nr_segs, loff_t *ppos) | 2017 | unsigned long nr_segs, loff_t *ppos) |
| 2014 | { | 2018 | { |
| @@ -2108,7 +2112,7 @@ generic_file_aio_write_nolock(struct kiocb *iocb, const struct iovec *iov, | |||
| 2108 | return ret; | 2112 | return ret; |
| 2109 | } | 2113 | } |
| 2110 | 2114 | ||
| 2111 | ssize_t | 2115 | static ssize_t |
| 2112 | __generic_file_write_nolock(struct file *file, const struct iovec *iov, | 2116 | __generic_file_write_nolock(struct file *file, const struct iovec *iov, |
| 2113 | unsigned long nr_segs, loff_t *ppos) | 2117 | unsigned long nr_segs, loff_t *ppos) |
| 2114 | { | 2118 | { |
| @@ -2229,7 +2233,7 @@ EXPORT_SYMBOL(generic_file_writev); | |||
| 2229 | * Called under i_sem for writes to S_ISREG files. Returns -EIO if something | 2233 | * Called under i_sem for writes to S_ISREG files. Returns -EIO if something |
| 2230 | * went wrong during pagecache shootdown. | 2234 | * went wrong during pagecache shootdown. |
| 2231 | */ | 2235 | */ |
| 2232 | ssize_t | 2236 | static ssize_t |
| 2233 | generic_file_direct_IO(int rw, struct kiocb *iocb, const struct iovec *iov, | 2237 | generic_file_direct_IO(int rw, struct kiocb *iocb, const struct iovec *iov, |
| 2234 | loff_t offset, unsigned long nr_segs) | 2238 | loff_t offset, unsigned long nr_segs) |
| 2235 | { | 2239 | { |
| @@ -2264,4 +2268,3 @@ generic_file_direct_IO(int rw, struct kiocb *iocb, const struct iovec *iov, | |||
| 2264 | } | 2268 | } |
| 2265 | return retval; | 2269 | return retval; |
| 2266 | } | 2270 | } |
| 2267 | EXPORT_SYMBOL_GPL(generic_file_direct_IO); | ||
diff --git a/mm/memory.c b/mm/memory.c index 788a62810340..ae8161f1f459 100644 --- a/mm/memory.c +++ b/mm/memory.c | |||
| @@ -2225,7 +2225,7 @@ void update_mem_hiwater(struct task_struct *tsk) | |||
| 2225 | #if !defined(__HAVE_ARCH_GATE_AREA) | 2225 | #if !defined(__HAVE_ARCH_GATE_AREA) |
| 2226 | 2226 | ||
| 2227 | #if defined(AT_SYSINFO_EHDR) | 2227 | #if defined(AT_SYSINFO_EHDR) |
| 2228 | struct vm_area_struct gate_vma; | 2228 | static struct vm_area_struct gate_vma; |
| 2229 | 2229 | ||
| 2230 | static int __init gate_vma_init(void) | 2230 | static int __init gate_vma_init(void) |
| 2231 | { | 2231 | { |
diff --git a/mm/oom_kill.c b/mm/oom_kill.c index 5ec8da12cfd9..ac3bf33e5370 100644 --- a/mm/oom_kill.c +++ b/mm/oom_kill.c | |||
| @@ -300,6 +300,5 @@ retry: | |||
| 300 | * Give "p" a good chance of killing itself before we | 300 | * Give "p" a good chance of killing itself before we |
| 301 | * retry to allocate memory. | 301 | * retry to allocate memory. |
| 302 | */ | 302 | */ |
| 303 | __set_current_state(TASK_INTERRUPTIBLE); | 303 | schedule_timeout_interruptible(1); |
| 304 | schedule_timeout(1); | ||
| 305 | } | 304 | } |
diff --git a/mm/page_alloc.c b/mm/page_alloc.c index 3974fd81d27c..c5823c395f71 100644 --- a/mm/page_alloc.c +++ b/mm/page_alloc.c | |||
| @@ -335,7 +335,7 @@ static inline void free_pages_check(const char *function, struct page *page) | |||
| 335 | /* | 335 | /* |
| 336 | * Frees a list of pages. | 336 | * Frees a list of pages. |
| 337 | * Assumes all pages on list are in same zone, and of same order. | 337 | * Assumes all pages on list are in same zone, and of same order. |
| 338 | * count is the number of pages to free, or 0 for all on the list. | 338 | * count is the number of pages to free. |
| 339 | * | 339 | * |
| 340 | * If the zone was previously in an "all pages pinned" state then look to | 340 | * If the zone was previously in an "all pages pinned" state then look to |
| 341 | * see if this freeing clears that state. | 341 | * see if this freeing clears that state. |
| @@ -1720,7 +1720,7 @@ next: | |||
| 1720 | cachep->objsize = size; | 1720 | cachep->objsize = size; |
| 1721 | 1721 | ||
| 1722 | if (flags & CFLGS_OFF_SLAB) | 1722 | if (flags & CFLGS_OFF_SLAB) |
| 1723 | cachep->slabp_cache = kmem_find_general_cachep(slab_size,0); | 1723 | cachep->slabp_cache = kmem_find_general_cachep(slab_size, 0u); |
| 1724 | cachep->ctor = ctor; | 1724 | cachep->ctor = ctor; |
| 1725 | cachep->dtor = dtor; | 1725 | cachep->dtor = dtor; |
| 1726 | cachep->name = name; | 1726 | cachep->name = name; |
| @@ -2839,7 +2839,7 @@ out: | |||
| 2839 | * New and improved: it will now make sure that the object gets | 2839 | * New and improved: it will now make sure that the object gets |
| 2840 | * put on the correct node list so that there is no false sharing. | 2840 | * put on the correct node list so that there is no false sharing. |
| 2841 | */ | 2841 | */ |
| 2842 | void *kmem_cache_alloc_node(kmem_cache_t *cachep, int flags, int nodeid) | 2842 | void *kmem_cache_alloc_node(kmem_cache_t *cachep, unsigned int __nocast flags, int nodeid) |
| 2843 | { | 2843 | { |
| 2844 | unsigned long save_flags; | 2844 | unsigned long save_flags; |
| 2845 | void *ptr; | 2845 | void *ptr; |
diff --git a/mm/swap_state.c b/mm/swap_state.c index 029e56eb5e77..adbc2b426c2f 100644 --- a/mm/swap_state.c +++ b/mm/swap_state.c | |||
| @@ -67,8 +67,8 @@ void show_swap_cache_info(void) | |||
| 67 | * __add_to_swap_cache resembles add_to_page_cache on swapper_space, | 67 | * __add_to_swap_cache resembles add_to_page_cache on swapper_space, |
| 68 | * but sets SwapCache flag and private instead of mapping and index. | 68 | * but sets SwapCache flag and private instead of mapping and index. |
| 69 | */ | 69 | */ |
| 70 | static int __add_to_swap_cache(struct page *page, | 70 | static int __add_to_swap_cache(struct page *page, swp_entry_t entry, |
| 71 | swp_entry_t entry, int gfp_mask) | 71 | unsigned int __nocast gfp_mask) |
| 72 | { | 72 | { |
| 73 | int error; | 73 | int error; |
| 74 | 74 | ||
diff --git a/mm/swapfile.c b/mm/swapfile.c index 4b6e8bf986bc..0184f510aace 100644 --- a/mm/swapfile.c +++ b/mm/swapfile.c | |||
| @@ -1153,8 +1153,7 @@ asmlinkage long sys_swapoff(const char __user * specialfile) | |||
| 1153 | p->highest_bit = 0; /* cuts scans short */ | 1153 | p->highest_bit = 0; /* cuts scans short */ |
| 1154 | while (p->flags >= SWP_SCANNING) { | 1154 | while (p->flags >= SWP_SCANNING) { |
| 1155 | spin_unlock(&swap_lock); | 1155 | spin_unlock(&swap_lock); |
| 1156 | set_current_state(TASK_UNINTERRUPTIBLE); | 1156 | schedule_timeout_uninterruptible(1); |
| 1157 | schedule_timeout(1); | ||
| 1158 | spin_lock(&swap_lock); | 1157 | spin_lock(&swap_lock); |
| 1159 | } | 1158 | } |
| 1160 | 1159 | ||
