Re: [PATCH] nfs/blocklayout: Use the passed in gfp flags

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Dan,

On Fri, Jul 21, 2023 at 10:58 AM Dan Carpenter <dan.carpenter@xxxxxxxxxx> wrote:
>
> This allocation should use the passed in GFP_ flags instead of
> GFP_KERNEL.  All the callers that I reviewed passed GFP_KERNEL as the
> allocation flags so this might not affect runtime, but it's still worth
> cleaning up.

If all the callers are passing GFP_KERNEL anyway, then can we instead
remove the gfp_mask argument from these functions?

Anna

>
> Fixes: 5c83746a0cf2 ("pnfs/blocklayout: in-kernel GETDEVICEINFO XDR parsing")
> Signed-off-by: Dan Carpenter <dan.carpenter@xxxxxxxxxx>
> ---
>  fs/nfs/blocklayout/dev.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/fs/nfs/blocklayout/dev.c b/fs/nfs/blocklayout/dev.c
> index 70f5563a8e81..65cbb5607a5f 100644
> --- a/fs/nfs/blocklayout/dev.c
> +++ b/fs/nfs/blocklayout/dev.c
> @@ -404,7 +404,7 @@ bl_parse_concat(struct nfs_server *server, struct pnfs_block_dev *d,
>         int ret, i;
>
>         d->children = kcalloc(v->concat.volumes_count,
> -                       sizeof(struct pnfs_block_dev), GFP_KERNEL);
> +                       sizeof(struct pnfs_block_dev), gfp_mask);
>         if (!d->children)
>                 return -ENOMEM;
>
> @@ -433,7 +433,7 @@ bl_parse_stripe(struct nfs_server *server, struct pnfs_block_dev *d,
>         int ret, i;
>
>         d->children = kcalloc(v->stripe.volumes_count,
> -                       sizeof(struct pnfs_block_dev), GFP_KERNEL);
> +                       sizeof(struct pnfs_block_dev), gfp_mask);
>         if (!d->children)
>                 return -ENOMEM;
>
> --
> 2.39.2
>




[Index of Archives]     [Kernel Development]     [Kernel Announce]     [Kernel Newbies]     [Linux Networking Development]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Device Mapper]

  Powered by Linux