diff options
Diffstat (limited to 'mm')
-rw-r--r-- | mm/memory.c | 8 | ||||
-rw-r--r-- | mm/slab.c | 2 | ||||
-rw-r--r-- | mm/vmscan.c | 6 |
3 files changed, 8 insertions, 8 deletions
diff --git a/mm/memory.c b/mm/memory.c index de7dc07f8..83f1586d4 100644 --- a/mm/memory.c +++ b/mm/memory.c @@ -373,12 +373,12 @@ void zap_page_range(struct mm_struct *mm, unsigned long address, unsigned long s spin_unlock(&mm->page_table_lock); /* * Update rss for the mm_struct (not necessarily current->mm) + * Notice that rss is an unsigned long. */ - if (mm->rss > 0) { + if (mm->rss > freed) mm->rss -= freed; - if (mm->rss < 0) - mm->rss = 0; - } + else + mm->rss = 0; } @@ -1966,7 +1966,7 @@ int slabinfo_read_proc (char *page, char **start, off_t off, #define MAX_SLABINFO_WRITE 128 /** * slabinfo_write_proc - SMP tuning for the slab allocator - * @file: + * @file: unused * @buffer: user buffer * @count: data len * @data: unused diff --git a/mm/vmscan.c b/mm/vmscan.c index f19721ee5..c43456da6 100644 --- a/mm/vmscan.c +++ b/mm/vmscan.c @@ -548,9 +548,9 @@ static int do_try_to_free_pages(unsigned int gfp_mask) if (!--count) goto done; } - /* We return 1 if we are freed some page, or - * there are no memory pressure remaining */ - return (count != FREE_COUNT || !memory_pressure()); + /* Return 1 if any page is freed, or + * there are no more memory pressure */ + return (count < FREE_COUNT || !memory_pressure()); done: return 1; |