summaryrefslogtreecommitdiffstats
path: root/arch/sparc/kernel/sys_sunos.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/sparc/kernel/sys_sunos.c')
-rw-r--r--arch/sparc/kernel/sys_sunos.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/sparc/kernel/sys_sunos.c b/arch/sparc/kernel/sys_sunos.c
index ed610942e..e8475ffeb 100644
--- a/arch/sparc/kernel/sys_sunos.c
+++ b/arch/sparc/kernel/sys_sunos.c
@@ -196,7 +196,7 @@ asmlinkage int sunos_brk(unsigned long brk)
* simple, it hopefully works in most obvious cases.. Easy to
* fool it, but this should catch most mistakes.
*/
- freepages = buffermem >> PAGE_SHIFT;
+ freepages = atomic_read(&buffermem) >> PAGE_SHIFT;
freepages += atomic_read(&page_cache_size);
freepages >>= 1;
freepages += nr_free_pages;