linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Badari Pulavarty <pbadari@us.ibm.com>
To: axboe@suse.de (Jens Axboe), linux-kernel@vger.kernel.org
Subject: [PATCH] small bugfix for ll_rw_bio() for 2.5.3-pre3
Date: Wed, 23 Jan 2002 16:44:24 -0800 (PST)	[thread overview]
Message-ID: <200201240044.g0O0iOh24822@eng2.beaverton.ibm.com> (raw)
In-Reply-To: <20020115145549.M31878@suse.de> from "Jens Axboe" at Jan 15, 2002 01:55:49 PM PST

Hi,

Here is a small bug fix for ll_rw_bio() for 2.5.3-pre3. 
kio->io_count can be safely incremented only after 
bio_alloc() success. 

Thanks,
Badari

--- linux-253pre3/fs/bio.c	Thu Dec 27 08:15:15 2001
+++ linux-253pre3.new/fs/bio.c	Wed Jan 23 17:32:59 2002
@@ -368,8 +368,6 @@
 	if (nr_pages > total_nr_pages)
 		nr_pages = total_nr_pages;
 
-	atomic_inc(&kio->io_count);
-
 	/*
 	 * allocate bio and do initial setup
 	 */
@@ -377,6 +375,8 @@
 		err = -ENOMEM;
 		goto out;
 	}
+
+	atomic_inc(&kio->io_count);
 
 	bio->bi_sector = sector;
 	bio->bi_dev = dev;


  parent reply	other threads:[~2002-01-24  0:44 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-01-09 19:56 [PATCH] O_DIRECT with hardware blocksize alignment Joel Becker
2002-01-12 12:31 ` Andrea Arcangeli
2002-01-15  3:21   ` Joel Becker
2002-01-15 12:20     ` Andrea Arcangeli
2002-01-15 13:08       ` Jens Axboe
2002-01-15 13:55         ` Jens Axboe
2002-01-15 21:23           ` Badari Pulavarty
2002-01-15 21:44             ` Alan Cox
2002-01-24  0:44           ` Badari Pulavarty [this message]
2002-01-24 21:52           ` O_DIRECT broken in 2.5.3-preX ? Badari Pulavarty
2002-01-28  2:06             ` Andrea Arcangeli
2002-01-16  0:08       ` [PATCH] O_DIRECT with hardware blocksize alignment Joel Becker

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=200201240044.g0O0iOh24822@eng2.beaverton.ibm.com \
    --to=pbadari@us.ibm.com \
    --cc=axboe@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;
as well as URLs for NNTP newsgroup(s).