linux-raid.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH][2.5] new list macros for md (7 occ)
@ 2002-06-09 14:39 Lightweight patch manager
  2002-06-13  3:47 ` Neil Brown
  0 siblings, 1 reply; 2+ messages in thread
From: Lightweight patch manager @ 2002-06-09 14:39 UTC (permalink / raw)
  To: Ingo Molnar; +Cc: Neil Brown, linux-raid

This uses the new list macros (list_move*, list_del_init) for the multiple 
devices driver

diff -Nur linus-2.5/drivers/md/lvm-snap.c thunder-2.5/drivers/md/lvm-snap.c
--- linus-2.5/drivers/md/lvm-snap.c	Sun Jun  9 04:14:24 2002
+++ thunder-2.5/drivers/md/lvm-snap.c	Sun Jun  9 05:43:25 2002
@@ -109,11 +109,9 @@
 		    kdev_same(exception->rdev_org, org_dev))
 		{
 			if (i)
-			{
 				/* fun, isn't it? :) */
-				list_del(next);
-				list_add(next, hash_table);
-			}
+				list_move(next, hash_table);
+
 			ret = exception;
 			break;
 		}
diff -Nur linus-2.5/drivers/md/md.c thunder-2.5/drivers/md/md.c
--- linus-2.5/drivers/md/md.c	Sun Jun  9 04:14:25 2002
+++ thunder-2.5/drivers/md/md.c	Sun Jun  9 05:42:52 2002
@@ -626,8 +626,7 @@
 		MD_BUG();
 		return;
 	}
-	list_del(&rdev->same_set);
-	INIT_LIST_HEAD(&rdev->same_set);
+	list_del_init(&rdev->same_set);
 	rdev->mddev->nb_dev--;
 	printk(KERN_INFO "md: unbind<%s,%d>\n", partition_name(rdev->dev),
 						 rdev->mddev->nb_dev);
@@ -680,13 +679,12 @@
 		MD_BUG();
 	unlock_rdev(rdev);
 	free_disk_sb(rdev);
-	list_del(&rdev->all);
-	INIT_LIST_HEAD(&rdev->all);
+	list_del_init(&rdev->all);
+
 	if (rdev->pending.next != &rdev->pending) {
 		printk(KERN_INFO "md: (%s was pending)\n",
 			partition_name(rdev->dev));
-		list_del(&rdev->pending);
-		INIT_LIST_HEAD(&rdev->pending);
+		list_del_init(&rdev->pending);
 	}
 #ifndef MODULE
 	md_autodetect_dev(rdev->dev);
@@ -745,8 +743,7 @@
 		schedule();
 
 	del_mddev_mapping(mddev, mk_kdev(MD_MAJOR, mdidx(mddev)));
-	list_del(&mddev->all_mddevs);
-	INIT_LIST_HEAD(&mddev->all_mddevs);
+	list_del_init(&mddev->all_mddevs);
 	kfree(mddev);
 	MOD_DEC_USE_COUNT;
 }
@@ -1935,8 +1932,7 @@
 					continue;
 				}
 				printk(KERN_INFO "md:  adding %s ...\n", partition_name(rdev->dev));
-				list_del(&rdev->pending);
-				list_add(&rdev->pending, &candidates);
+				list_move(&rdev->pending, &candidates);
 			}
 		}
 		/*
@@ -1963,8 +1959,7 @@
 		printk(KERN_INFO "md: created md%d\n", mdidx(mddev));
 		ITERATE_RDEV_GENERIC(candidates,pending,rdev,tmp) {
 			bind_rdev_to_array(rdev, mddev);
-			list_del(&rdev->pending);
-			INIT_LIST_HEAD(&rdev->pending);
+			list_del_init(&rdev->pending);
 		}
 		autorun_array(mddev);
 	}

-- 
Lightweight patch manager using pine. If you have any objections, tell me.


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

* Re: [PATCH][2.5] new list macros for md (7 occ)
  2002-06-09 14:39 [PATCH][2.5] new list macros for md (7 occ) Lightweight patch manager
@ 2002-06-13  3:47 ` Neil Brown
  0 siblings, 0 replies; 2+ messages in thread
From: Neil Brown @ 2002-06-13  3:47 UTC (permalink / raw)
  To: Lightweight patch manager; +Cc: Ingo Molnar, linux-raid

On Sunday June 9, patch@luckynet.dynu.com wrote:
> This uses the new list macros (list_move*, list_del_init) for the multiple 
> devices driver

Thanks.  I have all of the (the md ones, not the lvm ones) in a patch
that fixes assorted other list.h related uglinesses in the code.  I
will be sending it to Linus shortly.

NeilBrown

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

end of thread, other threads:[~2002-06-13  3:47 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-06-09 14:39 [PATCH][2.5] new list macros for md (7 occ) Lightweight patch manager
2002-06-13  3:47 ` Neil Brown

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).