/* This leaf block cannot have a "remote" value, we only call this routine if bmap_one_block() says there is only one block (ie: no remote blks).  */
STATIC int xfs_attr_leaf_get(xfs_da_args_t *args)
/* This leaf block cannot have a "remote" value, we only call this routine if bmap_one_block() says there is only one block (ie: no remote blks).  */
STATIC int xfs_attr_leaf_get(xfs_da_args_t *args)
{
	xfs_dabuf_t *bp;
	int error;
	args->blkno = 0;
	error = xfs_da_read_buf(args->trans, args->dp, args->blkno, -1, &bp,
					     XFS_ATTR_FORK);
	if (error)
		return(error);
	ASSERT(bp != NULL);
	error = xfs_attr_leaf_lookup_int(bp, args);
	if (error != EEXIST)  {
		xfs_da_brelse(args->trans, bp);
		return(error);
	}
	error = xfs_attr_leaf_getvalue(bp, args);
	xfs_da_brelse(args->trans, bp);
	if (!error && (args->rmtblkno > 0) && !(args->flags & ATTR_KERNOVAL)) {
		error = xfs_attr_rmtval_get(args);
	}
	return(error);
}