Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 320346
b: refs/heads/master
c: 505cbb9
h: refs/heads/master
v: v3
  • Loading branch information
Alex Elder authored and Sage Weil committed Jul 31, 2012
1 parent 0dafec5 commit 8c14c04
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 9 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 78dc447d3ca3701206a1dd813c901556a3fad451
refs/heads/master: 505cbb9bedc8c609c31d86ff4f8f656e5a0f9c49
10 changes: 2 additions & 8 deletions trunk/drivers/block/rbd.c
Original file line number Diff line number Diff line change
Expand Up @@ -537,6 +537,7 @@ static int rbd_header_from_disk(struct rbd_image_header *header,

atomic_set(&header->snapc->nref, 1);
header->snap_seq = le64_to_cpu(ondisk->snap_seq);
header->snapc->seq = le64_to_cpu(ondisk->snap_seq);
header->snapc->num_snaps = snap_count;
header->total_snaps = snap_count;

Expand Down Expand Up @@ -1685,14 +1686,7 @@ static int rbd_header_add_snap(struct rbd_device *rbd_dev,

kfree(data);

if (ret < 0)
return ret;

down_write(&rbd_dev->header_rwsem);
rbd_dev->header.snapc->seq = new_snapid;
up_write(&rbd_dev->header_rwsem);

return 0;
return ret < 0 ? ret : 0;
bad:
return -ERANGE;
}
Expand Down

0 comments on commit 8c14c04

Please sign in to comment.