* [patch] swsusp: kill unneeded/unbalanced bio_get
@ 2006-02-05 11:46 Pavel Machek
[not found] ` <s5h1wyg9yan.wl%tiwai@suse.de>
0 siblings, 1 reply; 2+ messages in thread
From: Pavel Machek @ 2006-02-05 11:46 UTC (permalink / raw)
To: Andrew Morton, kernel list; +Cc: Rafael J. Wysocki
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!
^ permalink raw reply [flat|nested] 2+ messages in thread
* [patch] swsusp: kill unneeded/unbalanced bio_get (try 2)
[not found] ` <s5h1wyg9yan.wl%tiwai@suse.de>
@ 2006-02-07 9:44 ` Pavel Machek
0 siblings, 0 replies; 2+ messages in thread
From: Pavel Machek @ 2006-02-07 9:44 UTC (permalink / raw)
To: Takashi Iwai, Andrew Morton, kernel list
I messed the first attempt up, it only moved leak to error path. Could
you replace it with this?
---
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>
diff --git a/kernel/power/swsusp.c b/kernel/power/swsusp.c
index 59c91c1..c91275e 100644
--- 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;
--
Web maintainer for suspend.sf.net (www.sf.net/projects/suspend) wanted...
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2006-02-07 9:44 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-02-05 11:46 [patch] swsusp: kill unneeded/unbalanced bio_get Pavel Machek
[not found] ` <s5h1wyg9yan.wl%tiwai@suse.de>
2006-02-07 9:44 ` [patch] swsusp: kill unneeded/unbalanced bio_get (try 2) Pavel Machek
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®