Skip to content

Commit 6bc080d

Browse files
oleg-nesterovtorvalds
authored andcommitted
debugfs: use list_next_entry() in debugfs_remove_recursive()
Change debugfs_remove_recursive() to use list_next_entry(child), no changes in generated code. Signed-off-by: Oleg Nesterov <oleg@redhat.com> Cc: Eilon Greenstein <eilong@broadcom.com> Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Cc: Peter Zijlstra <a.p.zijlstra@chello.nl> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
1 parent 93be3c2 commit 6bc080d

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

‎fs/debugfs/inode.c‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -566,8 +566,7 @@ void debugfs_remove_recursive(struct dentry *dentry)
566566
mutex_lock(&parent->d_inode->i_mutex);
567567

568568
if (child != dentry) {
569-
next = list_entry(child->d_u.d_child.next, struct dentry,
570-
d_u.d_child);
569+
next = list_next_entry(child, d_u.d_child);
571570
goto up;
572571
}
573572

0 commit comments

Comments
 (0)