Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 309453
b: refs/heads/master
c: 263c6ca
h: refs/heads/master
i:
  309451: 1e0a546
v: v3
  • Loading branch information
Josh Durgin authored and Alex Elder committed May 14, 2012
1 parent c0cff58 commit c57c594
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 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: 3591538fb272d2432d112d47d7e0ddd0be4cded2
refs/heads/master: 263c6ca007a6693fb724a24c5a55716c49d33573
12 changes: 6 additions & 6 deletions trunk/drivers/block/rbd.c
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,7 @@ static void rbd_put_dev(struct rbd_device *rbd_dev)
put_device(&rbd_dev->dev);
}

static int __rbd_update_snaps(struct rbd_device *rbd_dev);
static int __rbd_refresh_header(struct rbd_device *rbd_dev);

static int rbd_open(struct block_device *bdev, fmode_t mode)
{
Expand Down Expand Up @@ -1222,7 +1222,7 @@ static void rbd_watch_cb(u64 ver, u64 notify_id, u8 opcode, void *data)
dout("rbd_watch_cb %s notify_id=%lld opcode=%d\n", dev->obj_md_name,
notify_id, (int)opcode);
mutex_lock_nested(&ctl_mutex, SINGLE_DEPTH_NESTING);
rc = __rbd_update_snaps(dev);
rc = __rbd_refresh_header(dev);
mutex_unlock(&ctl_mutex);
if (rc)
pr_warning(RBD_DRV_NAME "%d got notification but failed to "
Expand Down Expand Up @@ -1689,7 +1689,7 @@ static void __rbd_remove_all_snaps(struct rbd_device *rbd_dev)
/*
* only read the first part of the ondisk header, without the snaps info
*/
static int __rbd_update_snaps(struct rbd_device *rbd_dev)
static int __rbd_refresh_header(struct rbd_device *rbd_dev)
{
int ret;
struct rbd_image_header h;
Expand Down Expand Up @@ -1876,7 +1876,7 @@ static ssize_t rbd_image_refresh(struct device *dev,

mutex_lock_nested(&ctl_mutex, SINGLE_DEPTH_NESTING);

rc = __rbd_update_snaps(rbd_dev);
rc = __rbd_refresh_header(rbd_dev);
if (rc < 0)
ret = rc;

Expand Down Expand Up @@ -2159,7 +2159,7 @@ static int rbd_init_watch_dev(struct rbd_device *rbd_dev)
rbd_dev->header.obj_version);
if (ret == -ERANGE) {
mutex_lock_nested(&ctl_mutex, SINGLE_DEPTH_NESTING);
rc = __rbd_update_snaps(rbd_dev);
rc = __rbd_refresh_header(rbd_dev);
mutex_unlock(&ctl_mutex);
if (rc < 0)
return rc;
Expand Down Expand Up @@ -2544,7 +2544,7 @@ static ssize_t rbd_snap_add(struct device *dev,
if (ret < 0)
goto err_unlock;

ret = __rbd_update_snaps(rbd_dev);
ret = __rbd_refresh_header(rbd_dev);
if (ret < 0)
goto err_unlock;

Expand Down

0 comments on commit c57c594

Please sign in to comment.