if (page) { page->nr_swapped = 0; } 
if (page) set_page_private(page, 0); 
static swp_entry_t *shmem_swp_alloc(struct shmem_inode_info *info, unsigned long index, enum sgp_type sgp){	struct inode *inode = &info->vfs_inode;	struct shmem_sb_info *sbinfo = SHMEM_SB(inode->i_sb);	struct page *page = NULL;	swp_entry_t *entry;	if (sgp != SGP_WRITE &&	    ((loff_t) index << PAGE_CACHE_SHIFT) >= i_size_read(inode))		return ERR_PTR(-EINVAL);	while (!(entry = shmem_swp_entry(info, index, &page))) {		if (sgp == SGP_READ)			return shmem_swp_map(ZERO_PAGE(0));		/*		 * Test free_blocks against 1 not 0, since we have 1 data		 * page (and perhaps indirect index pages) yet to allocate:		 * a waste to allocate index if we cannot allocate data.		 */		if (sbinfo->max_blocks) {			spin_lock(&sbinfo->stat_lock);			if (sbinfo->free_blocks <= 1) {				spin_unlock(&sbinfo->stat_lock);				return ERR_PTR(-ENOSPC);			}			sbinfo->free_blocks--;			inode->i_blocks += BLOCKS_PER_PAGE;			spin_unlock(&sbinfo->stat_lock);		}		spin_unlock(&info->lock);		page = shmem_dir_alloc(mapping_gfp_mask(inode->i_mapping) | __GFP_ZERO);		if (page) {			page->nr_swapped = 0;		}		spin_lock(&info->lock);		if (!page) {			shmem_free_blocks(inode, 1);			return ERR_PTR(-ENOMEM);		}		if (sgp != SGP_WRITE &&		    ((loff_t) index << PAGE_CACHE_SHIFT) >= i_size_read(inode)) {			entry = ERR_PTR(-EINVAL);			break;		}		if (info->next_index <= index)			info->next_index = index + 1;	}	if (page) {		/* another task gave its page, or truncated the file */		shmem_free_blocks(inode, 1);		shmem_dir_free(page);	}	if (info->next_index <= index && !IS_ERR(entry))		info->next_index = index + 1;	return entry;}
10457	/local/tlutelli/issta_data/temp/c/2005_temp/2005/10457/4c21e2f2441dc5fbb957b030333f5a3f2d02dea7/shmem.c/clean/mm/shmem.c