summaryrefslogtreecommitdiffstats
path: root/fs/f2fs/data.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/f2fs/data.c')
-rw-r--r--fs/f2fs/data.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/fs/f2fs/data.c b/fs/f2fs/data.c
index 444c2a6fbaa0..655aeabc1dd4 100644
--- a/fs/f2fs/data.c
+++ b/fs/f2fs/data.c
@@ -343,11 +343,12 @@ int f2fs_readpage(struct f2fs_sb_info *sbi, struct page *page,
down_read(&sbi->bio_sem);
/* Allocate a new bio */
- bio = f2fs_bio_alloc(bdev, blk_addr << (sbi->log_blocksize - 9),
- 1, GFP_NOFS | __GFP_HIGH);
+ bio = f2fs_bio_alloc(bdev, 1);
/* Initialize the bio */
+ bio->bi_sector = SECTOR_FROM_BLOCK(sbi, blk_addr);
bio->bi_end_io = read_end_io;
+
if (bio_add_page(bio, page, PAGE_CACHE_SIZE, 0) < PAGE_CACHE_SIZE) {
kfree(bio->bi_private);
bio_put(bio);
OpenPOWER on IntegriCloud