Skip to contentSkip to conversation

next_mnt() cleanup

PATCH In review Coywolf Qi Hunt 2 participants 2 messages Jun 10, 2005 VFS

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 next_mnt() cleanup

hello,

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

fs/namespace.c +1 -2
@@ -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;
#1 lore raw

Hi,

Sorry, this is insane, forget it.

Quoted 19 lines · Coywolf Qi Hunt

hello,

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

fs/namespace.c 2005-06-10 14:56:47.000000000 +0800 renamed from fs/namespace.c 2005-06-06 09:24:44.000000000 +0800 +1 -2
@@ -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;
Signature · 2 lines
Coywolf Qi Hunt
http://ahbl.org/~coywolf/