Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 54677
b: refs/heads/master
c: 3361c7b
h: refs/heads/master
i:
  54675: aa43c84
v: v3
  • Loading branch information
Jeffrey Layton authored and Linus Torvalds committed May 8, 2007
1 parent 258d110 commit 76c2719
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 15 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: 9d0633cfedde484d30eef869f749c04709ab3e42
refs/heads/master: 3361c7bebbf207f57f3dd1282cd87e1e37c082ac
24 changes: 10 additions & 14 deletions trunk/fs/inode.c
Original file line number Diff line number Diff line change
Expand Up @@ -685,25 +685,21 @@ ino_t iunique(struct super_block *sb, ino_t max_reserved)
{
static ino_t counter;
struct inode *inode;
struct hlist_head * head;
struct hlist_head *head;
ino_t res;

spin_lock(&inode_lock);
retry:
if (counter > max_reserved) {
head = inode_hashtable + hash(sb,counter);
do {
if (counter <= max_reserved)
counter = max_reserved + 1;
res = counter++;
head = inode_hashtable + hash(sb, res);
inode = find_inode_fast(sb, head, res);
if (!inode) {
spin_unlock(&inode_lock);
return res;
}
} else {
counter = max_reserved + 1;
}
goto retry;

}
} while (inode != NULL);
spin_unlock(&inode_lock);

return res;
}
EXPORT_SYMBOL(iunique);

struct inode *igrab(struct inode *inode)
Expand Down

0 comments on commit 76c2719

Please sign in to comment.