From: Oleg Nesterov Date: Tue, 12 Nov 2013 23:10:04 +0000 (-0800) Subject: debugfs: use list_next_entry() in debugfs_remove_recursive() X-Git-Tag: accepted/tizen/common/20141203.182822~1142^2~89 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=6bc080d8fdae33f4463203a400cfaa01e91701e2;p=platform%2Fkernel%2Flinux-arm64.git 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 Cc: Eilon Greenstein Cc: Greg Kroah-Hartman Cc: Peter Zijlstra Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/fs/debugfs/inode.c b/fs/debugfs/inode.c index c7c83ff..9c0444c 100644 --- a/fs/debugfs/inode.c +++ b/fs/debugfs/inode.c @@ -566,8 +566,7 @@ void debugfs_remove_recursive(struct dentry *dentry) mutex_lock(&parent->d_inode->i_mutex); if (child != dentry) { - next = list_entry(child->d_u.d_child.next, struct dentry, - d_u.d_child); + next = list_next_entry(child, d_u.d_child); goto up; }