* If truncating down to a partial page, then
* if that page is already allocated, hold it
* in memory until the truncation is over, so
* If truncating down to a partial page, then
* if that page is already allocated, hold it
* in memory until the truncation is over, so
shmem_recalc_inode(inode);
if (swap.val && add_to_swap_cache(page, swap, GFP_ATOMIC) == 0) {
shmem_recalc_inode(inode);
if (swap.val && add_to_swap_cache(page, swap, GFP_ATOMIC) == 0) {
shmem_swp_set(info, entry, swap.val);
shmem_swp_unmap(entry);
if (list_empty(&info->swaplist))
shmem_swp_set(info, entry, swap.val);
shmem_swp_unmap(entry);
if (list_empty(&info->swaplist))
swap_writepage(page, wbc);
if (inode) {
mutex_lock(&shmem_swaplist_mutex);
swap_writepage(page, wbc);
if (inode) {
mutex_lock(&shmem_swaplist_mutex);