Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 107270
b: refs/heads/master
c: 9a18540
h: refs/heads/master
v: v3
  • Loading branch information
Alexey Dobriyan authored and Al Viro committed Aug 1, 2008
1 parent 11a99bf commit 70c2b46
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 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: 67935df49dae836fa86621861979fafdfd37ae59
refs/heads/master: 9a18540915faaaadd7f71c16fa877a0c19675923
10 changes: 5 additions & 5 deletions trunk/fs/proc/generic.c
Original file line number Diff line number Diff line change
Expand Up @@ -300,7 +300,7 @@ static int xlate_proc_name(const char *name,
return rtn;
}

static DEFINE_IDR(proc_inum_idr);
static DEFINE_IDA(proc_inum_ida);
static DEFINE_SPINLOCK(proc_inum_lock); /* protects the above */

#define PROC_DYNAMIC_FIRST 0xF0000000U
Expand All @@ -315,11 +315,11 @@ static unsigned int get_inode_number(void)
int error;

retry:
if (idr_pre_get(&proc_inum_idr, GFP_KERNEL) == 0)
if (ida_pre_get(&proc_inum_ida, GFP_KERNEL) == 0)
return 0;

spin_lock(&proc_inum_lock);
error = idr_get_new(&proc_inum_idr, NULL, &i);
error = ida_get_new(&proc_inum_ida, &i);
spin_unlock(&proc_inum_lock);
if (error == -EAGAIN)
goto retry;
Expand All @@ -328,7 +328,7 @@ static unsigned int get_inode_number(void)

if (i > UINT_MAX - PROC_DYNAMIC_FIRST) {
spin_lock(&proc_inum_lock);
idr_remove(&proc_inum_idr, i);
ida_remove(&proc_inum_ida, i);
spin_unlock(&proc_inum_lock);
}
return PROC_DYNAMIC_FIRST + i;
Expand All @@ -337,7 +337,7 @@ static unsigned int get_inode_number(void)
static void release_inode_number(unsigned int inum)
{
spin_lock(&proc_inum_lock);
idr_remove(&proc_inum_idr, inum - PROC_DYNAMIC_FIRST);
ida_remove(&proc_inum_ida, inum - PROC_DYNAMIC_FIRST);
spin_unlock(&proc_inum_lock);
}

Expand Down

0 comments on commit 70c2b46

Please sign in to comment.