Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 16514
b: refs/heads/master
c: d229a95
h: refs/heads/master
v: v3
  • Loading branch information
David Teigland authored and Linus Torvalds committed Jan 6, 2006
1 parent c2f6f8d commit 1ff21c7
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 637842cfdbe2b981f7088f7633e630570f58efaf
refs/heads/master: d229a9589ff3b988d3f999cdcfa350f97a372673
10 changes: 10 additions & 0 deletions trunk/drivers/md/dm.c
Original file line number Diff line number Diff line change
Expand Up @@ -921,6 +921,16 @@ static struct mapped_device *dm_find_md(dev_t dev)
return md;
}

struct mapped_device *dm_get_md(dev_t dev)
{
struct mapped_device *md = dm_find_md(dev);

if (md)
dm_get(md);

return md;
}

void *dm_get_mdptr(dev_t dev)
{
struct mapped_device *md;
Expand Down
1 change: 1 addition & 0 deletions trunk/drivers/md/dm.h
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ int dm_create(struct mapped_device **md);
int dm_create_with_minor(unsigned int minor, struct mapped_device **md);
void dm_set_mdptr(struct mapped_device *md, void *ptr);
void *dm_get_mdptr(dev_t dev);
struct mapped_device *dm_get_md(dev_t dev);

/*
* Reference counting for md.
Expand Down

0 comments on commit 1ff21c7

Please sign in to comment.