public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Andreas Dilger <adilger@turbolabs.com>
To: andersg@0x63.nu
Cc: Jens Axboe <axboe@suse.de>, Andrew Morton <akpm@zip.com.au>,
	linux-kernel@vger.kernel.org, lvm-devel@sistina.com
Subject: Re: [lvm-devel] Re: lvm in 2.5.1
Date: Thu, 27 Dec 2001 10:18:46 -0700	[thread overview]
Message-ID: <20011227101846.B12868@lynx.no> (raw)
In-Reply-To: <20011227084304.GA26255@h55p111.delphi.afb.lu.se> <3C2AEADB.24BEFE94@zip.com.au> <20011227122520.GA2194@h55p111.delphi.afb.lu.se> <20011227135453.GA5803@h55p111.delphi.afb.lu.se> <20011227162019.C1730@suse.de> <20011227160232.GA11106@h55p111.delphi.afb.lu.se>
In-Reply-To: <20011227160232.GA11106@h55p111.delphi.afb.lu.se>; from andersg@0x63.nu on Thu, Dec 27, 2001 at 05:02:32PM +0100

On Dec 27, 2001  17:02 +0100, andersg@0x63.nu wrote:
> you mean like this?
> 
> -- 
> 
> //anders/g
> 
> diff -ru linux-2.5.2-pre2/drivers/md/lvm.c linux-2.5.2-pre2-lvmfix/drivers/md/lvm.c
> --- linux-2.5.2-pre2/drivers/md/lvm.c	Thu Dec 27 08:28:39 2001
> +++ linux-2.5.2-pre2-lvmfix/drivers/md/lvm.c	Thu Dec 27 16:43:52 2001
> @@ -1533,8 +1549,10 @@
>  			}
>  			vg_ptr->lv[l] = NULL;
>  			/* only create original logical volumes for now */
> -			if (lvm_do_lv_create(minor, lv.lv_name, &lv) != 0) {
> +			if (lvm_do_lv_create(minor, tmplv->lv_name, tmplv) != 0) {
>  				lvm_do_vg_remove(minor);
> +				vfree(snap_lv_ptr);
> +				kfree(tmplv);
>  				return -EFAULT;
>  			}
>  		}

How about re-doing this to look more like:

				lvm_do_vg_remove(minor);
				ret = -EFAULT;
				goto exit_lv;
			}
		}
.
.
.
	vg_count++;

	MOD_INC_USE_COUNT;

	/* let's go active */
	vg_ptr->vg_status |= VG_ACTIVE;

exit_lv:
	kfree(tmplv);
exit_snap:
	vfree(snap_lv_ptr);

	return ret;
}

Cheers, Andreas
--
Andreas Dilger
http://sourceforge.net/projects/ext2resize/
http://www-mddsp.enel.ucalgary.ca/People/adilger/


  parent reply	other threads:[~2001-12-27 17:20 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-12-27  8:43 lvm in 2.5.1 andersg
2001-12-27  9:33 ` Andrew Morton
2001-12-27 12:25   ` andersg
2001-12-27 13:54     ` andersg
2001-12-27 15:20       ` Jens Axboe
2001-12-27 16:02         ` andersg
2001-12-27 16:11           ` Jens Axboe
2001-12-27 17:18           ` Andreas Dilger [this message]
2001-12-27 19:25     ` Andrew Morton
2001-12-27 19:37       ` andersg
2001-12-27 19:45         ` Andrew Morton
2001-12-27 20:24           ` andersg
2001-12-28 16:45             ` Jan Niehusmann
2001-12-28 20:17               ` [lvm-devel] " Andreas Dilger
2001-12-28 20:43                 ` andersg

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=20011227101846.B12868@lynx.no \
    --to=adilger@turbolabs.com \
    --cc=akpm@zip.com.au \
    --cc=andersg@0x63.nu \
    --cc=axboe@suse.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lvm-devel@sistina.com \
    /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