Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 262184
b: refs/heads/master
c: d15b774
h: refs/heads/master
v: v3
  • Loading branch information
Alasdair G Kergon committed Aug 2, 2011
1 parent ffd08e7 commit c400b85
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 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: bb91bc7bacb906c9f3a9b22744c53fa7564b51ba
refs/heads/master: d15b774c2920d55e3d58275c97fbe3adc3afde38
10 changes: 8 additions & 2 deletions trunk/drivers/md/dm.c
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,8 @@ static const char *_name = DM_NAME;
static unsigned int major = 0;
static unsigned int _major = 0;

static DEFINE_IDR(_minor_idr);

static DEFINE_SPINLOCK(_minor_lock);
/*
* For bio-based dm.
Expand Down Expand Up @@ -313,6 +315,12 @@ static void __exit dm_exit(void)

while (i--)
_exits[i]();

/*
* Should be empty by this point.
*/
idr_remove_all(&_minor_idr);
idr_destroy(&_minor_idr);
}

/*
Expand Down Expand Up @@ -1705,8 +1713,6 @@ static int dm_any_congested(void *congested_data, int bdi_bits)
/*-----------------------------------------------------------------
* An IDR is used to keep track of allocated minor numbers.
*---------------------------------------------------------------*/
static DEFINE_IDR(_minor_idr);

static void free_minor(int minor)
{
spin_lock(&_minor_lock);
Expand Down

0 comments on commit c400b85

Please sign in to comment.