Lines Matching refs:pages
208 static inline int shmem_acct_block(unsigned long flags, long pages) in shmem_acct_block() argument
214 pages * VM_ACCT(PAGE_SIZE)); in shmem_acct_block()
217 static inline void shmem_unacct_blocks(unsigned long flags, long pages) in shmem_unacct_blocks() argument
220 vm_unacct_memory(pages * VM_ACCT(PAGE_SIZE)); in shmem_unacct_blocks()
223 static inline bool shmem_inode_acct_block(struct inode *inode, long pages) in shmem_inode_acct_block() argument
228 if (shmem_acct_block(info->flags, pages)) in shmem_inode_acct_block()
233 sbinfo->max_blocks - pages) > 0) in shmem_inode_acct_block()
235 percpu_counter_add(&sbinfo->used_blocks, pages); in shmem_inode_acct_block()
241 shmem_unacct_blocks(info->flags, pages); in shmem_inode_acct_block()
245 static inline void shmem_inode_unacct_blocks(struct inode *inode, long pages) in shmem_inode_unacct_blocks() argument
251 percpu_counter_sub(&sbinfo->used_blocks, pages); in shmem_inode_unacct_blocks()
252 shmem_unacct_blocks(info->flags, pages); in shmem_inode_unacct_blocks()
382 bool shmem_charge(struct inode *inode, long pages) in shmem_charge() argument
387 if (!shmem_inode_acct_block(inode, pages)) in shmem_charge()
391 inode->i_mapping->nrpages += pages; in shmem_charge()
394 info->alloced += pages; in shmem_charge()
395 inode->i_blocks += pages * BLOCKS_PER_PAGE; in shmem_charge()
402 void shmem_uncharge(struct inode *inode, long pages) in shmem_uncharge() argument
410 info->alloced -= pages; in shmem_uncharge()
411 inode->i_blocks -= pages * BLOCKS_PER_PAGE; in shmem_uncharge()
415 shmem_inode_unacct_blocks(inode, pages); in shmem_uncharge()
870 PAGEVEC_SIZE, pvec.pages, indices); in shmem_unlock_mapping()
934 pvec.pages, indices); in shmem_undo_range()
938 struct page *page = pvec.pages[i]; in shmem_undo_range()
1005 pvec.pages, indices); in shmem_undo_range()
1015 struct page *page = pvec.pages[i]; in shmem_undo_range()
1255 struct page *page = pvec.pages[i]; in shmem_unuse_swap_entries()
1296 pvec.pages, indices, in shmem_unuse_inode()
2667 pvec.nr, pvec.pages, indices); in shmem_seek_hole_data()
2681 page = pvec.pages[i]; in shmem_seek_hole_data()