提交 2b98a54f 编写于 作者: S Steven Whitehouse

[GFS2] Fix bug in super block reading code

This gets the argument to submit_bio() correct.
Signed-off-by: NSteven Whitehouse <swhiteho@redhat.com>
上级 dd894be8
...@@ -167,6 +167,8 @@ static int end_bio_io_page(struct bio *bio, unsigned int bytes_done, int error) ...@@ -167,6 +167,8 @@ static int end_bio_io_page(struct bio *bio, unsigned int bytes_done, int error)
if (!error) if (!error)
SetPageUptodate(page); SetPageUptodate(page);
else
printk(KERN_WARNING "gfs2: error %d reading superblock\n", error);
unlock_page(page); unlock_page(page);
return 0; return 0;
} }
...@@ -196,7 +198,7 @@ static struct page *gfs2_read_super(struct super_block *sb, sector_t sector) ...@@ -196,7 +198,7 @@ static struct page *gfs2_read_super(struct super_block *sb, sector_t sector)
bio->bi_end_io = end_bio_io_page; bio->bi_end_io = end_bio_io_page;
bio->bi_private = page; bio->bi_private = page;
submit_bio(READ | BIO_RW_SYNC, bio); submit_bio(READ_SYNC, bio);
wait_on_page_locked(page); wait_on_page_locked(page);
bio_put(bio); bio_put(bio);
if (!PageUptodate(page)) { if (!PageUptodate(page)) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册