linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/2] fs: optimize mpage_readpage()
@ 2010-05-29  1:18 Changli Gao
  2010-05-29 12:10 ` Borislav Petkov
  0 siblings, 1 reply; 9+ messages in thread
From: Changli Gao @ 2010-05-29  1:18 UTC (permalink / raw)
  To: Alexander Viro; +Cc: linux-fsdevel, linux-kernel, Changli Gao

optimize mpage_readpage()

we don't need to initialize bio, and pass it to do_mpage_readpage() as
parameter, as it is returned by do_mpage_readpage().

Signed-off-by: Changli Gao <xiaosuo@gmail.com>
----
 fs/mpage.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/fs/mpage.c b/fs/mpage.c
index fd56ca2..94ff0d1 100644
--- a/fs/mpage.c
+++ b/fs/mpage.c
@@ -409,14 +409,14 @@ EXPORT_SYMBOL(mpage_readpages);
  */
 int mpage_readpage(struct page *page, get_block_t get_block)
 {
-	struct bio *bio = NULL;
+	struct bio *bio;
 	sector_t last_block_in_bio = 0;
 	struct buffer_head map_bh;
 	unsigned long first_logical_block = 0;
 
 	map_bh.b_state = 0;
 	map_bh.b_size = 0;
-	bio = do_mpage_readpage(bio, page, 1, &last_block_in_bio,
+	bio = do_mpage_readpage(NULL, page, 1, &last_block_in_bio,
 			&map_bh, &first_logical_block, get_block);
 	if (bio)
 		mpage_bio_submit(READ, bio);

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

end of thread, other threads:[~2010-06-04 10:18 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-05-29  1:18 [PATCH 1/2] fs: optimize mpage_readpage() Changli Gao
2010-05-29 12:10 ` Borislav Petkov
2010-05-29 13:26   ` Changli Gao
2010-05-29 13:46     ` Borislav Petkov
2010-05-29 14:17       ` Changli Gao
2010-06-04  7:19   ` Al Viro
2010-06-04  8:13     ` Borislav Petkov
2010-06-04  8:30       ` Al Viro
2010-06-04 10:18         ` Borislav Petkov

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).