aboutsummaryrefslogtreecommitdiffstats
path: root/block/blk-core.c
diff options
context:
space:
mode:
Diffstat (limited to 'block/blk-core.c')
-rw-r--r--block/blk-core.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/block/blk-core.c b/block/blk-core.c
index f0834e2f5727..17fcb83670c0 100644
--- a/block/blk-core.c
+++ b/block/blk-core.c
@@ -1351,7 +1351,7 @@ static void handle_bad_sector(struct bio *bio)
1351 bdevname(bio->bi_bdev, b), 1351 bdevname(bio->bi_bdev, b),
1352 bio->bi_rw, 1352 bio->bi_rw,
1353 (unsigned long long)bio->bi_sector + bio_sectors(bio), 1353 (unsigned long long)bio->bi_sector + bio_sectors(bio),
1354 (long long)(bio->bi_bdev->bd_inode->i_size >> 9)); 1354 (long long)(i_size_read(bio->bi_bdev->bd_inode) >> 9));
1355 1355
1356 set_bit(BIO_EOF, &bio->bi_flags); 1356 set_bit(BIO_EOF, &bio->bi_flags);
1357} 1357}
@@ -1404,7 +1404,7 @@ static inline int bio_check_eod(struct bio *bio, unsigned int nr_sectors)
1404 return 0; 1404 return 0;
1405 1405
1406 /* Test device or partition size, when known. */ 1406 /* Test device or partition size, when known. */
1407 maxsector = bio->bi_bdev->bd_inode->i_size >> 9; 1407 maxsector = i_size_read(bio->bi_bdev->bd_inode) >> 9;
1408 if (maxsector) { 1408 if (maxsector) {
1409 sector_t sector = bio->bi_sector; 1409 sector_t sector = bio->bi_sector;
1410 1410