 if (unlikely(mp->m_flags & XFS_MOUNT_COMPAT_ATTR)) { if (bytes <= XFS_IFORK_ASIZE(dp)) return mp->m_attroffset >> 3; return 0; } 
xfs_attr_shortform_bytesfit(xfs_inode_t *dp, int bytes){	int offset;	int minforkoff;	/* lower limit on valid forkoff locations */	int maxforkoff;	/* upper limit on valid forkoff locations */	xfs_mount_t *mp = dp->i_mount;	if (unlikely(mp->m_flags & XFS_MOUNT_COMPAT_ATTR)) {		if (bytes <= XFS_IFORK_ASIZE(dp))			return mp->m_attroffset >> 3;		return 0;	}	offset = (XFS_LITINO(mp) - bytes) >> 3; /* rounded down */	switch (dp->i_d.di_format) {	case XFS_DINODE_FMT_DEV:		minforkoff = roundup(sizeof(xfs_dev_t), 8) >> 3;		return (offset >= minforkoff) ? minforkoff : 0;	case XFS_DINODE_FMT_UUID:		minforkoff = roundup(sizeof(uuid_t), 8) >> 3;		return (offset >= minforkoff) ? minforkoff : 0;	}	/* data fork btree root can have at least this many key/ptr pairs */	minforkoff = MAX(dp->i_df.if_bytes, XFS_BMDR_SPACE_CALC(MINDBTPTRS));	minforkoff = roundup(minforkoff, 8) >> 3;	/* attr fork btree root can have at least this many key/ptr pairs */	maxforkoff = XFS_LITINO(mp) - XFS_BMDR_SPACE_CALC(MINABTPTRS);	maxforkoff = maxforkoff >> 3;	/* rounded down */	if (offset >= minforkoff && offset < maxforkoff)		return offset;	if (offset >= maxforkoff)		return maxforkoff;	return 0;}
4520	/local/tlutelli/issta_data/temp/c/2005_temp/2005/4520/da087bad810b48dd889a504e6af0a582ba18df0d/xfs_attr_leaf.c/buggy/fs/xfs/xfs_attr_leaf.c