Skip to content

Commit

Permalink
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel…
Browse files Browse the repository at this point in the history
…/git/sage/ceph-client

Pull Ceph fix from Sage Weil:
 "This fixes another problem with using v2 images on 3.10 due to the
  order in which fields are read from the image header.

  Hopefully this is the last one"

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/sage/ceph-client:
  rbd: fetch object order before using it
  • Loading branch information
torvalds committed Jun 26, 2013
2 parents 1e876e3 + 1617e40 commit 78750f1
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions drivers/block/rbd.c
Original file line number Diff line number Diff line change
Expand Up @@ -4243,6 +4243,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)
Expand Down Expand Up @@ -4276,10 +4280,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;
Expand Down

0 comments on commit 78750f1

Please sign in to comment.