Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 262077
b: refs/heads/master
c: 43c1c9c
h: refs/heads/master
i:
  262075: 85c91eb
v: v3
  • Loading branch information
David Howells authored and Al Viro committed Aug 1, 2011
1 parent ee9e9c8 commit b8e50f4
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 18 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: c6627c60c07c43b51ef88e352627fa786d1e1592
refs/heads/master: 43c1c9cd244098012441b90c32304f11f1258d43
22 changes: 5 additions & 17 deletions trunk/fs/dcache.c
Original file line number Diff line number Diff line change
Expand Up @@ -842,33 +842,21 @@ static void shrink_dcache_for_umount_subtree(struct dentry *dentry)

BUG_ON(!IS_ROOT(dentry));

/* detach this root from the system */
dentry_lru_del(dentry);
__d_shrink(dentry);

for (;;) {
/* descend to the first leaf in the current subtree */
while (!list_empty(&dentry->d_subdirs)) {
struct dentry *loop;

/* this is a branch with children - detach all of them
* from the system in one go */
list_for_each_entry(loop, &dentry->d_subdirs,
d_u.d_child) {
dentry_lru_del(loop);
__d_shrink(loop);
}

/* move to the first child */
while (!list_empty(&dentry->d_subdirs))
dentry = list_entry(dentry->d_subdirs.next,
struct dentry, d_u.d_child);
}

/* consume the dentries from this leaf up through its parents
* until we find one with children or run out altogether */
do {
struct inode *inode;

/* detach from the system */
dentry_lru_del(dentry);
__d_shrink(dentry);

if (dentry->d_count != 0) {
printk(KERN_ERR
"BUG: Dentry %p{i=%lx,n=%s}"
Expand Down

0 comments on commit b8e50f4

Please sign in to comment.