summaryrefslogtreecommitdiffstats
path: root/drivers/block/rbd.c
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2013-07-05 11:54:27 +0200
committerTakashi Iwai <tiwai@suse.de>2013-07-05 11:54:27 +0200
commit38f0ad7c90c2b2091e7d8689dde294fef27db68b (patch)
tree17742c032f74a953054a99ebc04ee6cd7ead2d9d /drivers/block/rbd.c
parent8f0b3b7e222383a21f7d58bd97d5552b3a5dbced (diff)
parent70a9f8797ce298544cfd07328ff59f00488bc491 (diff)
downloadop-kernel-dev-38f0ad7c90c2b2091e7d8689dde294fef27db68b.zip
op-kernel-dev-38f0ad7c90c2b2091e7d8689dde294fef27db68b.tar.gz
Merge tag 'asoc-v3.11-4' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-linus
ASoC: Updates for v3.11 A few small fixes, all driver specific. The removal of the GPIO based pinmuxing is a bug fix, since the obsolete nodes had been removed from the DT it stopped the driver loading.
Diffstat (limited to 'drivers/block/rbd.c')
-rw-r--r--drivers/block/rbd.c14
1 files changed, 9 insertions, 5 deletions
diff --git a/drivers/block/rbd.c b/drivers/block/rbd.c
index 49394e3..aff789d 100644
--- a/drivers/block/rbd.c
+++ b/drivers/block/rbd.c
@@ -2252,13 +2252,17 @@ static int rbd_img_request_fill(struct rbd_img_request *img_request,
obj_request->pages, length,
offset & ~PAGE_MASK, false, false);
+ /*
+ * set obj_request->img_request before formatting
+ * the osd_request so that it gets the right snapc
+ */
+ rbd_img_obj_request_add(img_request, obj_request);
if (write_request)
rbd_osd_req_format_write(obj_request);
else
rbd_osd_req_format_read(obj_request);
obj_request->img_offset = img_offset;
- rbd_img_obj_request_add(img_request, obj_request);
img_offset += length;
resid -= length;
@@ -4243,6 +4247,10 @@ static int rbd_dev_v2_header_info(struct rbd_device *rbd_dev)
down_write(&rbd_dev->header_rwsem);
+ ret = rbd_dev_v2_image_size(rbd_dev);
+ if (ret)
+ goto out;
+
if (first_time) {
ret = rbd_dev_v2_header_onetime(rbd_dev);
if (ret)
@@ -4276,10 +4284,6 @@ static int rbd_dev_v2_header_info(struct rbd_device *rbd_dev)
"is EXPERIMENTAL!");
}
- ret = rbd_dev_v2_image_size(rbd_dev);
- if (ret)
- goto out;
-
if (rbd_dev->spec->snap_id == CEPH_NOSNAP)
if (rbd_dev->mapping.size != rbd_dev->header.image_size)
rbd_dev->mapping.size = rbd_dev->header.image_size;
OpenPOWER on IntegriCloud