On 21/04/06 11:24AM, Goldwyn Rodrigues wrote:
> From: Goldwyn Rodrigues <rgold...@suse.com>
>
> Since struct reada_control is defined in ctree.h,
> Use struct reada_control pointer as a function argument for
> btrfs_reada_wait() instead of a void pointer in order
> to avoid type-casting within the function.
>
> Signed-off-by: Goldwyn Rodrigues <rgold...@suse.com>
> ---
>  fs/btrfs/ctree.h | 2 +-
>  fs/btrfs/reada.c | 6 ++----
>  2 files changed, 3 insertions(+), 5 deletions(-)
>
> diff --git a/fs/btrfs/ctree.h b/fs/btrfs/ctree.h
> index 2acbd8919611..8bf434a4f014 100644
> --- a/fs/btrfs/ctree.h
> +++ b/fs/btrfs/ctree.h
> @@ -3699,7 +3699,7 @@ struct reada_control {
>  };
>  struct reada_control *btrfs_reada_add(struct btrfs_root *root,
>                             struct btrfs_key *start, struct btrfs_key *end);
> -int btrfs_reada_wait(void *handle);
> +int btrfs_reada_wait(struct reada_control *rc);

While we are at it we may as well make this function return void.
Since we anyways always return 0 and no one seems to be handling the return
value anyways.


>  int btree_readahead_hook(struct extent_buffer *eb, int err);

I guess, you may want to look into return value from this function too.
I don't think that too is being checked by any of it's callers.

-ritesh

Reply via email to