mm: convert totalram_pages and totalhigh_pages variables to atomic
[sfrench/cifs-2.6.git] / drivers / md / dm-crypt.c
index a7195eb5b8d8949b87cfcedc5daf7c944abce5f2..a8c32de29e3fe9eeaf1fa106c52014944c5a5e9f 100644 (file)
@@ -2158,7 +2158,7 @@ static int crypt_wipe_key(struct crypt_config *cc)
 
 static void crypt_calculate_pages_per_client(void)
 {
-       unsigned long pages = (totalram_pages - totalhigh_pages) * DM_CRYPT_MEMORY_PERCENT / 100;
+       unsigned long pages = (totalram_pages() - totalhigh_pages()) * DM_CRYPT_MEMORY_PERCENT / 100;
 
        if (!dm_crypt_clients_n)
                return;