All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2] nfs/blocklayout: Use the passed in gfp flags
@ 2023-07-24  8:08 Dan Carpenter
  2023-07-24 13:45 ` Christoph Hellwig
  0 siblings, 1 reply; 2+ messages in thread
From: Dan Carpenter @ 2023-07-24  8:08 UTC (permalink / raw)
  To: Christoph Hellwig
  Cc: Trond Myklebust, Anna Schumaker, Jens Axboe, Jack Wang,
	Dave Chinner, Hannes Reinecke, Christian Brauner, linux-nfs,
	kernel-janitors

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: 5c83746a0cf2 ("pnfs/blocklayout: in-kernel GETDEVICEINFO XDR parsing")
Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
---
v2: Update the commit message as pointed out by Christophe JAILLET.

 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

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH v2] nfs/blocklayout: Use the passed in gfp flags
  2023-07-24  8:08 [PATCH v2] nfs/blocklayout: Use the passed in gfp flags Dan Carpenter
@ 2023-07-24 13:45 ` Christoph Hellwig
  0 siblings, 0 replies; 2+ messages in thread
From: Christoph Hellwig @ 2023-07-24 13:45 UTC (permalink / raw)
  To: Dan Carpenter
  Cc: Christoph Hellwig, Trond Myklebust, Anna Schumaker, Jens Axboe,
	Jack Wang, Dave Chinner, Hannes Reinecke, Christian Brauner,
	linux-nfs, kernel-janitors

Looks good:

Reviewed-by: Christoph Hellwig <hch@lst.de>

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2023-07-24 13:49 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-07-24  8:08 [PATCH v2] nfs/blocklayout: Use the passed in gfp flags Dan Carpenter
2023-07-24 13:45 ` Christoph Hellwig

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.