mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Pavel Machek <pavel@ucw.cz>
To: Andrew Morton <akpm@osdl.org>,
	kernel list <linux-kernel@vger.kernel.org>
Cc: "Rafael J. Wysocki" <rjw@sisk.pl>
Subject: [patch] swsusp: kill unneeded/unbalanced bio_get
Date: Sun, 5 Feb 2006 12:46:46 +0100	[thread overview]
Message-ID: <20060205114646.GA3138@elf.ucw.cz> (raw)


Takashi pointed out that I don't bio_put in non-error cases, and says
bio_get is not neccessary. It still works so I hope he's ok.

Signed-off-by: Pavel Machek <pavel@suse.cz>

--- a/kernel/power/swsusp.c
+++ b/kernel/power/swsusp.c
@@ -743,7 +743,6 @@ static int submit(int rw, pgoff_t page_o
 	if (!bio)
 		return -ENOMEM;
 	bio->bi_sector = page_off * (PAGE_SIZE >> 9);
-	bio_get(bio);
 	bio->bi_bdev = resume_bdev;
 	bio->bi_end_io = end_io;
 
@@ -762,7 +761,6 @@ static int submit(int rw, pgoff_t page_o
 		yield();
 
  Done:
-	bio_put(bio);
 	return error;
 }
 

-- 
Thanks, Sharp!

             reply	other threads:[~2006-02-05 11:46 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-02-05 11:46 Pavel Machek [this message]
     [not found] ` <s5h1wyg9yan.wl%tiwai@suse.de>
2006-02-07  9:44   ` [patch] swsusp: kill unneeded/unbalanced bio_get (try 2) Pavel Machek

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=20060205114646.GA3138@elf.ucw.cz \
    --to=pavel@ucw.cz \
    --cc=akpm@osdl.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rjw@sisk.pl \
    /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®