Skip to content

Commit

Permalink
nfs/blocklayout: Use the passed in gfp flags
Browse files Browse the repository at this point in the history
This allocation should use the passed in GFP_ flags instead of
GFP_KERNEL.  One places where this matters is in filelayout_pg_init_write()
which uses GFP_NOFS as the allocation flags.

Fixes: 5c83746 ("pnfs/blocklayout: in-kernel GETDEVICEINFO XDR parsing")
Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com>
  • Loading branch information
Dan Carpenter authored and Anna Schumaker committed Aug 24, 2023
1 parent a841c9c commit 08b45fc
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions fs/nfs/blocklayout/dev.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down Expand Up @@ -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;

Expand Down

0 comments on commit 08b45fc

Please sign in to comment.