mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Alasdair G Kergon <agk@redhat.com>
To: Andrew Morton <akpm@osdl.org>
Cc: linux-kernel@vger.kernel.org, jblunck@suse.de
Subject: [PATCH] device-mapper snapshot: bio_list fix
Date: Fri, 18 Nov 2005 14:55:47 +0000	[thread overview]
Message-ID: <20051118145547.GK11878@agk.surrey.redhat.com> (raw)

bio_list_merge() should do nothing if the second list is empty - not oops.

From: jblunck@suse.de
Signed-Off-By: Alasdair G Kergon <agk@redhat.com>

Index: linux-2.6.14/drivers/md/dm-bio-list.h
===================================================================
--- linux-2.6.14.orig/drivers/md/dm-bio-list.h	2005-10-28 01:02:08.000000000 +0100
+++ linux-2.6.14/drivers/md/dm-bio-list.h	2005-11-15 15:59:20.000000000 +0000
@@ -33,6 +33,9 @@ static inline void bio_list_add(struct b
 
 static inline void bio_list_merge(struct bio_list *bl, struct bio_list *bl2)
 {
+	if (!bl2->head)
+		return;
+
 	if (bl->tail)
 		bl->tail->bi_next = bl2->head;
 	else

             reply	other threads:[~2005-11-18 14:55 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-11-18 14:55 Alasdair G Kergon [this message]
2005-11-18 15:32 ` Alexander E. Patrakov
2005-11-18 15:39   ` Alasdair G Kergon
2005-11-18 16:56   ` jblunck

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20051118145547.GK11878@agk.surrey.redhat.com \
    --to=agk@redhat.com \
    --cc=akpm@osdl.org \
    --cc=jblunck@suse.de \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®