On Sun, Sep 01, 2013 at 11:39:28AM +0100, Filipe David Borba Manana wrote:
> +#ifdef CONFIG_BTRFS_ASSERT
> +static int key_search_validate(struct extent_buffer *b,
> + struct btrfs_key *key,
> + int level)
> +{
...
> +}
> +#endif
> +
> +static int key_search(struct extent_buffer *b, struct btrfs_key *key,
> + int level, int *prev_cmp, int *slot)
> +{
> + if (*prev_cmp != 0) {
> + *prev_cmp = bin_search(b, key, level, slot);
> + return *prev_cmp;
> + }
> +
> + ASSERT(key_search_validate(b, key, level));
But what if I want to use key_search_validate out of the context of an
ASSERT ? I don't see a reason why the function needs to be under #ifdef
BTRFS_ASSERT / #endif at all.
> + *slot = 0;
> +
> + return 0;
> +}
--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html