Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 347622
b: refs/heads/master
c: c3e946c
h: refs/heads/master
v: v3
  • Loading branch information
Alex Elder committed Dec 20, 2012
1 parent b6f4d28 commit 7deb5bb
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 13 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: c89ce05e0c5a01a256100ac6a6019f276bdd1ca6
refs/heads/master: c3e946ce7276faf0b302acd25c7b874edbeba661
14 changes: 2 additions & 12 deletions trunk/drivers/block/rbd.c
Original file line number Diff line number Diff line change
Expand Up @@ -290,16 +290,6 @@ static struct device rbd_root_dev = {
# define rbd_assert(expr) ((void) 0)
#endif /* !RBD_DEBUG */

static struct device *rbd_get_dev(struct rbd_device *rbd_dev)
{
return get_device(&rbd_dev->dev);
}

static void rbd_put_dev(struct rbd_device *rbd_dev)
{
put_device(&rbd_dev->dev);
}

static int rbd_dev_refresh(struct rbd_device *rbd_dev, u64 *hver);
static int rbd_dev_v2_refresh(struct rbd_device *rbd_dev, u64 *hver);

Expand All @@ -311,7 +301,7 @@ static int rbd_open(struct block_device *bdev, fmode_t mode)
return -EROFS;

mutex_lock_nested(&ctl_mutex, SINGLE_DEPTH_NESTING);
rbd_get_dev(rbd_dev);
(void) get_device(&rbd_dev->dev);
set_device_ro(bdev, rbd_dev->mapping.read_only);
rbd_dev->open_count++;
mutex_unlock(&ctl_mutex);
Expand All @@ -326,7 +316,7 @@ static int rbd_release(struct gendisk *disk, fmode_t mode)
mutex_lock_nested(&ctl_mutex, SINGLE_DEPTH_NESTING);
rbd_assert(rbd_dev->open_count > 0);
rbd_dev->open_count--;
rbd_put_dev(rbd_dev);
put_device(&rbd_dev->dev);
mutex_unlock(&ctl_mutex);

return 0;
Expand Down

0 comments on commit 7deb5bb

Please sign in to comment.