Skip to content

Commit

Permalink
rbd: use gfp_flags parameter in rbd_header_from_disk()
Browse files Browse the repository at this point in the history
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>
Reviewed-by: Alex Elder <elder@dreamhost.com>
  • Loading branch information
Dan Carpenter authored and Alex Elder committed May 14, 2012
1 parent 76aa542 commit f8ad495
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/block/rbd.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit f8ad495

Please sign in to comment.