Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 151238
b: refs/heads/master
c: 56a83cc
h: refs/heads/master
v: v3
  • Loading branch information
Steven Rostedt authored and Greg Kroah-Hartman committed Jun 16, 2009
1 parent 204f962 commit 4b63e1c
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: c0afe7ba5e71d8ab66bc42f90b3e237581d3c509
refs/heads/master: 56a83cc92991ed5bf76e224dd2ad53b5e9c00681
11 changes: 11 additions & 0 deletions trunk/fs/debugfs/inode.c
Original file line number Diff line number Diff line change
Expand Up @@ -403,6 +403,7 @@ void debugfs_remove_recursive(struct dentry *dentry)
}
child = list_entry(parent->d_subdirs.next, struct dentry,
d_u.d_child);
next_sibling:

/*
* If "child" isn't empty, walk down the tree and
Expand All @@ -416,6 +417,16 @@ void debugfs_remove_recursive(struct dentry *dentry)
}
__debugfs_remove(child, parent);
if (parent->d_subdirs.next == &child->d_u.d_child) {
/*
* Try the next sibling.
*/
if (child->d_u.d_child.next != &parent->d_subdirs) {
child = list_entry(child->d_u.d_child.next,
struct dentry,
d_u.d_child);
goto next_sibling;
}

/*
* Avoid infinite loop if we fail to remove
* one dentry.
Expand Down

0 comments on commit 4b63e1c

Please sign in to comment.