Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 156444
b: refs/heads/master
c: 8022c13
h: refs/heads/master
v: v3
  • Loading branch information
Artem Bityutskiy authored and David Woodhouse committed Aug 3, 2009
1 parent 1f87ed1 commit b01caec
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 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: 6afc4fdb3e94ba60cd566cb878b60c6c01979277
refs/heads/master: 8022c13c27b822cf22f13df10b42aae89cd56bf0
6 changes: 3 additions & 3 deletions trunk/drivers/mtd/mtd_blkdevs.c
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ static int blktrans_open(struct block_device *bdev, fmode_t mode)
struct mtd_blktrans_ops *tr = dev->tr;
int ret = -ENODEV;

if (!try_module_get(dev->mtd->owner))
if (!get_mtd_device(NULL, dev->mtd->index))
goto out;

if (!try_module_get(tr->owner))
Expand All @@ -158,7 +158,7 @@ static int blktrans_open(struct block_device *bdev, fmode_t mode)
ret = 0;
if (tr->open && (ret = tr->open(dev))) {
dev->mtd->usecount--;
module_put(dev->mtd->owner);
put_mtd_device(dev->mtd);
out_tr:
module_put(tr->owner);
}
Expand All @@ -177,7 +177,7 @@ static int blktrans_release(struct gendisk *disk, fmode_t mode)

if (!ret) {
dev->mtd->usecount--;
module_put(dev->mtd->owner);
put_mtd_device(dev->mtd);
module_put(tr->owner);
}

Expand Down

0 comments on commit b01caec

Please sign in to comment.