Lines Matching defs:swapped
416 * @swapped: the change in number of pages swapped from inode
421 * But normally info->alloced == inode->i_mapping->nrpages + info->swapped
422 * So mm freed is info->alloced - (inode->i_mapping->nrpages + info->swapped)
424 static void shmem_recalc_inode(struct inode *inode, long alloced, long swapped)
431 info->swapped += swapped;
432 freed = info->alloced - info->swapped -
437 * shmem_writepage() has to raise swapped before nrpages is lowered -
441 if (swapped > 0)
442 freed += swapped;
848 * given offsets are swapped out.
858 unsigned long swapped = 0;
866 swapped++;
876 return swapped << PAGE_SHIFT;
881 * given vma is swapped out.
891 unsigned long swapped;
894 swapped = READ_ONCE(info->swapped);
901 if (!swapped)
905 return swapped << PAGE_SHIFT;
947 /* The folio has been swapped out */
1127 if (info->alloced - info->swapped != inode->i_mapping->nrpages)
1312 * Move the swapped pages for an inode to page cache. Returns the count
1313 * of pages swapped in, or the error in case of failure.
1386 if (!info->swapped) {
1404 if (!info->swapped)
1498 * Add inode to shmem_unuse()'s list of swapped-out inodes,
1502 * we've incremented swapped, because shmem_unuse_inode() will
1503 * prune a !swapped inode from the swaplist under this mutex.
1707 freed = pages + info->alloced - info->swapped -
1844 * Caller has to make sure that *foliop contains a valid swapped folio.
2003 /* Has the folio been truncated or swapped out? */