[PATCH] mm: remove VM_ACCT(PAGE_SIZE) when charge and uncharge

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



VM_ACCT(PAGE_SIZE) is one, and it is unnecessary to multiply by it

Signed-off-by: Li RongQing <lirongqing@xxxxxxxxx>
---
 mm/shmem.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/mm/shmem.c b/mm/shmem.c
index cd570cc79c76..f01df46ef2ff 100644
--- a/mm/shmem.c
+++ b/mm/shmem.c
@@ -202,14 +202,13 @@ static inline int shmem_acct_block(unsigned long flags, long pages)
 	if (!(flags & VM_NORESERVE))
 		return 0;
 
-	return security_vm_enough_memory_mm(current->mm,
-			pages * VM_ACCT(PAGE_SIZE));
+	return security_vm_enough_memory_mm(current->mm, pages);
 }
 
 static inline void shmem_unacct_blocks(unsigned long flags, long pages)
 {
 	if (flags & VM_NORESERVE)
-		vm_unacct_memory(pages * VM_ACCT(PAGE_SIZE));
+		vm_unacct_memory(pages);
 }
 
 static inline bool shmem_inode_acct_block(struct inode *inode, long pages)
-- 
2.16.2





[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux