diff options
author | Alex Elder <elder@inktank.com> | 2012-07-19 09:09:27 -0500 |
---|---|---|
committer | Sage Weil <sage@inktank.com> | 2012-07-30 18:15:50 -0700 |
commit | ed63f4fd9a88218ee709e8f57c36c0c5f219a7ad (patch) | |
tree | e4de555e1d7b992184959df2fb19e489b12d1acd /drivers/block/rbd.c | |
parent | 9a5d690b08478fc2358d885703014853e44a357e (diff) | |
download | blackbird-obmc-linux-ed63f4fd9a88218ee709e8f57c36c0c5f219a7ad.tar.gz blackbird-obmc-linux-ed63f4fd9a88218ee709e8f57c36c0c5f219a7ad.zip |
rbd: drop rbd_header_from_disk() gfp_flags parameter
The function rbd_header_from_disk() is only called in one spot, and
it passes GFP_KERNEL as its value for the gfp_flags parameter.
Just drop that parameter and substitute GFP_KERNEL everywhere within
that function it had been used. (If we find we need the parameter
again in the future it's easy enough to add back again.)
Signed-off-by: Alex Elder <elder@inktank.com>
Reviewed-by: Josh Durgin <josh.durgin@inktank.com>
Diffstat (limited to 'drivers/block/rbd.c')
-rw-r--r-- | drivers/block/rbd.c | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/drivers/block/rbd.c b/drivers/block/rbd.c index eed58e99e18d..34ca5c686b46 100644 --- a/drivers/block/rbd.c +++ b/drivers/block/rbd.c @@ -493,8 +493,7 @@ static bool rbd_dev_ondisk_valid(struct rbd_image_header_ondisk *ondisk) */ static int rbd_header_from_disk(struct rbd_image_header *header, struct rbd_image_header_ondisk *ondisk, - u32 allocated_snaps, - gfp_t gfp_flags) + u32 allocated_snaps) { u32 i, snap_count; @@ -507,18 +506,18 @@ static int rbd_header_from_disk(struct rbd_image_header *header, return -EINVAL; header->snapc = kmalloc(sizeof(struct ceph_snap_context) + snap_count * sizeof(u64), - gfp_flags); + GFP_KERNEL); if (!header->snapc) return -ENOMEM; header->snap_names_len = le64_to_cpu(ondisk->snap_names_len); if (snap_count) { header->snap_names = kmalloc(header->snap_names_len, - gfp_flags); + GFP_KERNEL); if (!header->snap_names) goto err_snapc; header->snap_sizes = kmalloc(snap_count * sizeof(u64), - gfp_flags); + GFP_KERNEL); if (!header->snap_sizes) goto err_names; } else { @@ -527,7 +526,7 @@ static int rbd_header_from_disk(struct rbd_image_header *header, } header->object_prefix = kmalloc(sizeof (ondisk->block_name) + 1, - gfp_flags); + GFP_KERNEL); if (!header->object_prefix) goto err_sizes; @@ -1625,7 +1624,7 @@ static int rbd_read_header(struct rbd_device *rbd_dev, if (rc < 0) goto out_dh; - rc = rbd_header_from_disk(header, dh, snap_count, GFP_KERNEL); + rc = rbd_header_from_disk(header, dh, snap_count); if (rc < 0) { if (rc == -ENXIO) pr_warning("unrecognized header format" |