diff options
-rw-r--r-- | drivers/block/rbd.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/block/rbd.c b/drivers/block/rbd.c index 49394e3f31bc..247bf3099731 100644 --- a/drivers/block/rbd.c +++ b/drivers/block/rbd.c | |||
@@ -4243,6 +4243,10 @@ static int rbd_dev_v2_header_info(struct rbd_device *rbd_dev) | |||
4243 | 4243 | ||
4244 | down_write(&rbd_dev->header_rwsem); | 4244 | down_write(&rbd_dev->header_rwsem); |
4245 | 4245 | ||
4246 | ret = rbd_dev_v2_image_size(rbd_dev); | ||
4247 | if (ret) | ||
4248 | goto out; | ||
4249 | |||
4246 | if (first_time) { | 4250 | if (first_time) { |
4247 | ret = rbd_dev_v2_header_onetime(rbd_dev); | 4251 | ret = rbd_dev_v2_header_onetime(rbd_dev); |
4248 | if (ret) | 4252 | if (ret) |
@@ -4276,10 +4280,6 @@ static int rbd_dev_v2_header_info(struct rbd_device *rbd_dev) | |||
4276 | "is EXPERIMENTAL!"); | 4280 | "is EXPERIMENTAL!"); |
4277 | } | 4281 | } |
4278 | 4282 | ||
4279 | ret = rbd_dev_v2_image_size(rbd_dev); | ||
4280 | if (ret) | ||
4281 | goto out; | ||
4282 | |||
4283 | if (rbd_dev->spec->snap_id == CEPH_NOSNAP) | 4283 | if (rbd_dev->spec->snap_id == CEPH_NOSNAP) |
4284 | if (rbd_dev->mapping.size != rbd_dev->header.image_size) | 4284 | if (rbd_dev->mapping.size != rbd_dev->header.image_size) |
4285 | rbd_dev->mapping.size = rbd_dev->header.image_size; | 4285 | rbd_dev->mapping.size = rbd_dev->header.image_size; |