Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 8393
b: refs/heads/master
c: 0cdca3f
h: refs/heads/master
i:
  8391: d174abd
v: v3
  • Loading branch information
Domen Puncer authored and Linus Torvalds committed Sep 10, 2005
1 parent 87d551e commit 34262ee
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 13 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: fdadd65fbce0ff966cb8e74247d9636f52a7fc7a
refs/heads/master: 0cdca3f9806a3dbaa07b5e8175000cd513ba92d4
16 changes: 4 additions & 12 deletions trunk/fs/dcache.c
Original file line number Diff line number Diff line change
Expand Up @@ -337,12 +337,10 @@ struct dentry * d_find_alias(struct inode *inode)
*/
void d_prune_aliases(struct inode *inode)
{
struct list_head *tmp, *head = &inode->i_dentry;
struct dentry *dentry;
restart:
spin_lock(&dcache_lock);
tmp = head;
while ((tmp = tmp->next) != head) {
struct dentry *dentry = list_entry(tmp, struct dentry, d_alias);
list_for_each_entry(dentry, &inode->i_dentry, d_alias) {
spin_lock(&dentry->d_lock);
if (!atomic_read(&dentry->d_count)) {
__dget_locked(dentry);
Expand Down Expand Up @@ -463,10 +461,7 @@ void shrink_dcache_sb(struct super_block * sb)
* superblock to the most recent end of the unused list.
*/
spin_lock(&dcache_lock);
next = dentry_unused.next;
while (next != &dentry_unused) {
tmp = next;
next = tmp->next;
list_for_each_safe(tmp, next, &dentry_unused) {
dentry = list_entry(tmp, struct dentry, d_lru);
if (dentry->d_sb != sb)
continue;
Expand All @@ -478,10 +473,7 @@ void shrink_dcache_sb(struct super_block * sb)
* Pass two ... free the dentries for this superblock.
*/
repeat:
next = dentry_unused.next;
while (next != &dentry_unused) {
tmp = next;
next = tmp->next;
list_for_each_safe(tmp, next, &dentry_unused) {
dentry = list_entry(tmp, struct dentry, d_lru);
if (dentry->d_sb != sb)
continue;
Expand Down

0 comments on commit 34262ee

Please sign in to comment.