From: Dan Carpenter Date: Fri, 20 Apr 2012 20:49:44 +0000 (-0500) Subject: rbd: use gfp_flags parameter in rbd_header_from_disk() X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=f8ad495a8a0277b88c59bf38319e5e944aaf5a4a;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git rbd: use gfp_flags parameter in rbd_header_from_disk() 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 Reviewed-by: Alex Elder --- diff --git a/drivers/block/rbd.c b/drivers/block/rbd.c index a67fa63a966b..ca59d4d9471e 100644 --- a/drivers/block/rbd.c +++ b/drivers/block/rbd.c @@ -506,11 +506,11 @@ static int rbd_header_from_disk(struct rbd_image_header *header, header->snap_names_len = le64_to_cpu(ondisk->snap_names_len); 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 {