if (ni->type != AT_INDEX_ROOT) { 
if (ni->type != AT_INDEX_ALLOCATION) { 
static int ntfs_readpage(struct file *file, struct page *page){	ntfs_inode *ni, *base_ni;	u8 *kaddr;	ntfs_attr_search_ctx *ctx;	MFT_RECORD *mrec;	unsigned long flags;	u32 attr_len;	int err = 0;retry_readpage:	BUG_ON(!PageLocked(page));	/*	 * This can potentially happen because we clear PageUptodate() during	 * ntfs_writepage() of MstProtected() attributes.	 */	if (PageUptodate(page)) {		unlock_page(page);		return 0;	}	ni = NTFS_I(page->mapping->host);	/*	 * Only $DATA attributes can be encrypted and only unnamed $DATA	 * attributes can be compressed.  Index root can have the flags set but	 * this means to create compressed/encrypted files, not that the	 * attribute is compressed/encrypted.	 */	if (ni->type != AT_INDEX_ROOT) {		/* If attribute is encrypted, deny access, just like NT4. */		if (NInoEncrypted(ni)) {			BUG_ON(ni->type != AT_DATA);			err = -EACCES;			goto err_out;		}		/* Compressed data streams are handled in compress.c. */		if (NInoNonResident(ni) && NInoCompressed(ni)) {			BUG_ON(ni->type != AT_DATA);			BUG_ON(ni->name_len);			return ntfs_read_compressed_block(page);		}	}	/* NInoNonResident() == NInoIndexAllocPresent() */	if (NInoNonResident(ni)) {		/* Normal, non-resident data stream. */		return ntfs_read_block(page);	}	/*	 * Attribute is resident, implying it is not compressed or encrypted.	 * This also means the attribute is smaller than an mft record and	 * hence smaller than a page, so can simply zero out any pages with	 * index above 0.  Note the attribute can actually be marked compressed	 * but if it is resident the actual data is not compressed so we are	 * ok to ignore the compressed flag here.	 */	if (unlikely(page->index > 0)) {		kaddr = kmap_atomic(page, KM_USER0);		memset(kaddr, 0, PAGE_CACHE_SIZE);		flush_dcache_page(page);		kunmap_atomic(kaddr, KM_USER0);		goto done;	}	if (!NInoAttr(ni))		base_ni = ni;	else		base_ni = ni->ext.base_ntfs_ino;	/* Map, pin, and lock the mft record. */	mrec = map_mft_record(base_ni);	if (IS_ERR(mrec)) {		err = PTR_ERR(mrec);		goto err_out;	}	/*	 * If a parallel write made the attribute non-resident, drop the mft	 * record and retry the readpage.	 */	if (unlikely(NInoNonResident(ni))) {		unmap_mft_record(base_ni);		goto retry_readpage;	}	ctx = ntfs_attr_get_search_ctx(base_ni, mrec);	if (unlikely(!ctx)) {		err = -ENOMEM;		goto unm_err_out;	}	err = ntfs_attr_lookup(ni->type, ni->name, ni->name_len,			CASE_SENSITIVE, 0, NULL, 0, ctx);	if (unlikely(err))		goto put_unm_err_out;	attr_len = le32_to_cpu(ctx->attr->data.resident.value_length);	read_lock_irqsave(&ni->size_lock, flags);	if (unlikely(attr_len > ni->initialized_size))		attr_len = ni->initialized_size;	read_unlock_irqrestore(&ni->size_lock, flags);	kaddr = kmap_atomic(page, KM_USER0);	/* Copy the data to the page. */	memcpy(kaddr, (u8*)ctx->attr +			le16_to_cpu(ctx->attr->data.resident.value_offset),			attr_len);	/* Zero the remainder of the page. */	memset(kaddr + attr_len, 0, PAGE_CACHE_SIZE - attr_len);	flush_dcache_page(page);	kunmap_atomic(kaddr, KM_USER0);put_unm_err_out:	ntfs_attr_put_search_ctx(ctx);unm_err_out:	unmap_mft_record(base_ni);done:	SetPageUptodate(page);err_out:	unlock_page(page);	return err;}
10457	/local/tlutelli/issta_data/temp/c/2005_temp/2005/10457/4e64c88693fde1b1cbaa4cfecad43a0c3fad354e/aops.c/clean/fs/ntfs/aops.c