mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* Untangle code in bio.c
@ 2004-09-15 11:18 Pavel Machek
  2004-09-15 11:36 ` Andrew Morton
  0 siblings, 1 reply; 3+ messages in thread
From: Pavel Machek @ 2004-09-15 11:18 UTC (permalink / raw)
  To: kernel list, Andrew Morton, Rusty trivial patch monkey Russell

Hi!

bio.c uses quite ugly code with goto's, completely
unneccessarily. Please apply,
								Pavel

--- clean-mm/fs/bio.c	2004-09-15 12:58:10.000000000 +0200
+++ linux-mm/fs/bio.c	2004-09-15 13:00:51.000000000 +0200
@@ -143,7 +143,7 @@
 
 	bio = mempool_alloc(bio_pool, gfp_mask);
 	if (unlikely(!bio))
-		goto out;
+		return NULL;
 
 	bio_init(bio);
 
@@ -157,13 +157,11 @@
 noiovec:
 		bio->bi_io_vec = bvl;
 		bio->bi_destructor = bio_destructor;
-out:
 		return bio;
 	}
 
 	mempool_free(bio, bio_pool);
-	bio = NULL;
-	goto out;
+	return NULL;
 }
 
 /**
-- 
People were complaining that M$ turns users into beta-testers...
...jr ghea gurz vagb qrirybcref, naq gurl frrz gb yvxr vg gung jnl!

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2004-09-15 11:57 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-09-15 11:18 Untangle code in bio.c Pavel Machek
2004-09-15 11:36 ` Andrew Morton
2004-09-15 11:55   ` Jens Axboe

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®