public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [patch] next_mnt() cleanup
@ 2005-06-10  7:23 Coywolf Qi Hunt
  2005-06-10  7:38 ` Coywolf Qi Hunt
  0 siblings, 1 reply; 2+ messages in thread
From: Coywolf Qi Hunt @ 2005-06-10  7:23 UTC (permalink / raw)
  To: linux-kernel; +Cc: akpm

hello,

This is an obvious cleanup to next_mnt() by making use of list_empty().


Signed-off-by: Coywolf Qi Hunt <coywolf@lovecn.org>

--- linux-2.6.12-rc5-mm2/fs/namespace.c	2005-06-06 09:24:44.000000000 +0800
+++ linux-2.6.12-rc5-mm2-cy/fs/namespace.c	2005-06-10 14:56:47.000000000 +0800
@@ -133,8 +133,7 @@ static void attach_mnt(struct vfsmount *
 
 static struct vfsmount *next_mnt(struct vfsmount *p, struct vfsmount *root)
 {
-	struct list_head *next = p->mnt_mounts.next;
-	if (next == &p->mnt_mounts) {
+	if (list_empty(&p->mnt_mounts)) {
 		while (1) {
 			if (p == root)
 				return NULL;

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2005-06-10  7:38 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-06-10  7:23 [patch] next_mnt() cleanup Coywolf Qi Hunt
2005-06-10  7:38 ` Coywolf Qi Hunt

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox