diff options
Diffstat (limited to 'fs/buffer.c')
-rw-r--r-- | fs/buffer.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/fs/buffer.c b/fs/buffer.c index 6024877335ca..1c04ec66974e 100644 --- a/fs/buffer.c +++ b/fs/buffer.c | |||
@@ -2982,11 +2982,11 @@ static void guard_bh_eod(int rw, struct bio *bio, struct buffer_head *bh) | |||
2982 | * let it through, and the IO layer will turn it into | 2982 | * let it through, and the IO layer will turn it into |
2983 | * an EIO. | 2983 | * an EIO. |
2984 | */ | 2984 | */ |
2985 | if (unlikely(bio->bi_sector >= maxsector)) | 2985 | if (unlikely(bio->bi_iter.bi_sector >= maxsector)) |
2986 | return; | 2986 | return; |
2987 | 2987 | ||
2988 | maxsector -= bio->bi_sector; | 2988 | maxsector -= bio->bi_iter.bi_sector; |
2989 | bytes = bio->bi_size; | 2989 | bytes = bio->bi_iter.bi_size; |
2990 | if (likely((bytes >> 9) <= maxsector)) | 2990 | if (likely((bytes >> 9) <= maxsector)) |
2991 | return; | 2991 | return; |
2992 | 2992 | ||
@@ -2994,7 +2994,7 @@ static void guard_bh_eod(int rw, struct bio *bio, struct buffer_head *bh) | |||
2994 | bytes = maxsector << 9; | 2994 | bytes = maxsector << 9; |
2995 | 2995 | ||
2996 | /* Truncate the bio.. */ | 2996 | /* Truncate the bio.. */ |
2997 | bio->bi_size = bytes; | 2997 | bio->bi_iter.bi_size = bytes; |
2998 | bio->bi_io_vec[0].bv_len = bytes; | 2998 | bio->bi_io_vec[0].bv_len = bytes; |
2999 | 2999 | ||
3000 | /* ..and clear the end of the buffer for reads */ | 3000 | /* ..and clear the end of the buffer for reads */ |
@@ -3029,14 +3029,14 @@ int _submit_bh(int rw, struct buffer_head *bh, unsigned long bio_flags) | |||
3029 | */ | 3029 | */ |
3030 | bio = bio_alloc(GFP_NOIO, 1); | 3030 | bio = bio_alloc(GFP_NOIO, 1); |
3031 | 3031 | ||
3032 | bio->bi_sector = bh->b_blocknr * (bh->b_size >> 9); | 3032 | bio->bi_iter.bi_sector = bh->b_blocknr * (bh->b_size >> 9); |
3033 | bio->bi_bdev = bh->b_bdev; | 3033 | bio->bi_bdev = bh->b_bdev; |
3034 | bio->bi_io_vec[0].bv_page = bh->b_page; | 3034 | bio->bi_io_vec[0].bv_page = bh->b_page; |
3035 | bio->bi_io_vec[0].bv_len = bh->b_size; | 3035 | bio->bi_io_vec[0].bv_len = bh->b_size; |
3036 | bio->bi_io_vec[0].bv_offset = bh_offset(bh); | 3036 | bio->bi_io_vec[0].bv_offset = bh_offset(bh); |
3037 | 3037 | ||
3038 | bio->bi_vcnt = 1; | 3038 | bio->bi_vcnt = 1; |
3039 | bio->bi_size = bh->b_size; | 3039 | bio->bi_iter.bi_size = bh->b_size; |
3040 | 3040 | ||
3041 | bio->bi_end_io = end_bio_bh_io_sync; | 3041 | bio->bi_end_io = end_bio_bh_io_sync; |
3042 | bio->bi_private = bh; | 3042 | bio->bi_private = bh; |