if (!dir) return NULL;  
udf_find_entry(struct inode *dir, struct dentry *dentry,	struct udf_fileident_bh *fibh,	struct fileIdentDesc *cfi){	struct fileIdentDesc *fi=NULL;	loff_t f_pos;	int block, flen;	char fname[UDF_NAME_LEN];	char *nameptr;	uint8_t lfi;	uint16_t liu;	loff_t size;	kernel_lb_addr bloc, eloc;	uint32_t extoffset, elen, offset;	struct buffer_head *bh = NULL;	if (!dir)		return NULL;	size = (udf_ext0_offset(dir) + dir->i_size) >> 2;	f_pos = (udf_ext0_offset(dir) >> 2);	fibh->soffset = fibh->eoffset = (f_pos & ((dir->i_sb->s_blocksize - 1) >> 2)) << 2;	if (UDF_I_ALLOCTYPE(dir) == ICBTAG_FLAG_AD_IN_ICB)		fibh->sbh = fibh->ebh = NULL;	else if (inode_bmap(dir, f_pos >> (dir->i_sb->s_blocksize_bits - 2),		&bloc, &extoffset, &eloc, &elen, &offset, &bh) == (EXT_RECORDED_ALLOCATED >> 30))	{		offset >>= dir->i_sb->s_blocksize_bits;		block = udf_get_lb_pblock(dir->i_sb, eloc, offset);		if ((++offset << dir->i_sb->s_blocksize_bits) < elen)		{			if (UDF_I_ALLOCTYPE(dir) == ICBTAG_FLAG_AD_SHORT)				extoffset -= sizeof(short_ad);			else if (UDF_I_ALLOCTYPE(dir) == ICBTAG_FLAG_AD_LONG)				extoffset -= sizeof(long_ad);		}		else			offset = 0;		if (!(fibh->sbh = fibh->ebh = udf_tread(dir->i_sb, block)))		{			udf_release_data(bh);			return NULL;		}	}	else	{		udf_release_data(bh);		return NULL;	}	while ( (f_pos < size) )	{		fi = udf_fileident_read(dir, &f_pos, fibh, cfi, &bloc, &extoffset, &eloc, &elen, &offset, &bh);		if (!fi)		{			if (fibh->sbh != fibh->ebh)				udf_release_data(fibh->ebh);			udf_release_data(fibh->sbh);			udf_release_data(bh);			return NULL;		}		liu = le16_to_cpu(cfi->lengthOfImpUse);		lfi = cfi->lengthFileIdent;		if (fibh->sbh == fibh->ebh)		{			nameptr = fi->fileIdent + liu;		}		else		{			int poffset;	/* Unpaded ending offset */			poffset = fibh->soffset + sizeof(struct fileIdentDesc) + liu + lfi;			if (poffset >= lfi)				nameptr = (uint8_t *)(fibh->ebh->b_data + poffset - lfi);			else			{				nameptr = fname;				memcpy(nameptr, fi->fileIdent + liu, lfi - poffset);				memcpy(nameptr + lfi - poffset, fibh->ebh->b_data, poffset);			}		}		if ( (cfi->fileCharacteristics & FID_FILE_CHAR_DELETED) != 0 )		{			if ( !UDF_QUERY_FLAG(dir->i_sb, UDF_FLAG_UNDELETE) )				continue;		}	    		if ( (cfi->fileCharacteristics & FID_FILE_CHAR_HIDDEN) != 0 )		{			if ( !UDF_QUERY_FLAG(dir->i_sb, UDF_FLAG_UNHIDE) )				continue;		}		if (!lfi)			continue;		if ((flen = udf_get_filename(dir->i_sb, nameptr, fname, lfi)))		{			if (udf_match(flen, fname, dentry->d_name.len, dentry->d_name.name))			{				udf_release_data(bh);				return fi;			}		}	}	if (fibh->sbh != fibh->ebh)		udf_release_data(fibh->ebh);	udf_release_data(fibh->sbh);	udf_release_data(bh);	return NULL;}
10457	/local/tlutelli/issta_data/temp/c/2005_temp/2005/10457/1c71e22e4e4b4e7261f147635518d5634136c226/namei.c/buggy/fs/udf/namei.c