public inbox for kernel-janitors@vger.kernel.org
 help / color / mirror / Atom feed
* [patch] rbd: use gfp_flags parameter in rbd_header_from_disk()
@ 2012-03-22  6:33 Dan Carpenter
  2012-04-18 14:17 ` Alex Elder
  0 siblings, 1 reply; 2+ messages in thread
From: Dan Carpenter @ 2012-03-22  6:33 UTC (permalink / raw)
  To: Yehuda Sadeh; +Cc: Sage Weil, ceph-devel, kernel-janitors

We should use the gfp_flags that the caller specified instead of
GFP_KERNEL here.

There is only one caller and it uses GFP_KERNEL, so this change is just
a cleanup and doesn't change how the code works.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>

diff --git a/drivers/block/rbd.c b/drivers/block/rbd.c
index a6278e7..fc9341f 100644
--- a/drivers/block/rbd.c
+++ b/drivers/block/rbd.c
@@ -474,11 +474,11 @@ static int rbd_header_from_disk(struct rbd_image_header *header,
 		return -ENOMEM;
 	if (snap_count) {
 		header->snap_names = kmalloc(header->snap_names_len,
-					     GFP_KERNEL);
+					     gfp_flags);
 		if (!header->snap_names)
 			goto err_snapc;
 		header->snap_sizes = kmalloc(snap_count * sizeof(u64),
-					     GFP_KERNEL);
+					     gfp_flags);
 		if (!header->snap_sizes)
 			goto err_names;
 	} else {

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

end of thread, other threads:[~2012-04-18 14:17 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-03-22  6:33 [patch] rbd: use gfp_flags parameter in rbd_header_from_disk() Dan Carpenter
2012-04-18 14:17 ` Alex Elder

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox