Loading mpage.c +9 −2 Original line number Diff line number Diff line Loading @@ -94,7 +94,11 @@ static inline void __sdfat_submit_bio_write2(int flags, struct bio *bio) #if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 3, 0) static void mpage_write_end_io(struct bio *bio) { __mpage_write_end_io(bio, bio->bi_error); #if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 13, 0) __sdfat_writepage_end_io(bio, bio->bi_status); #else /* LINUX_VERSION_CODE < KERNEL_VERSION(4, 13, 0) */ __sdfat_writepage_end_io(bio, bio->bi_error); #endif } #else /* LINUX_VERSION_CODE < KERNEL_VERSION(4,3,0) */ static void mpage_write_end_io(struct bio *bio, int err) Loading Loading @@ -277,7 +281,11 @@ mpage_alloc(struct block_device *bdev, } if (bio) { #if LINUX_VERSION_CODE >= KERNEL_VERSION(4,14,0) bio_set_dev(bio, bdev); #else bio->bi_bdev = bdev; #endif __sdfat_set_bio_sector(bio, first_sector); } return bio; Loading Loading @@ -604,4 +612,3 @@ int sdfat_mpage_writepages(struct address_space *mapping, } #endif /* CONFIG_SDFAT_ALIGNED_MPAGE_WRITE */ sdfat.c +8 −5 Original line number Diff line number Diff line Loading @@ -216,15 +216,14 @@ static inline void inode_unlock(struct inode *inode) #endif #if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 13, 0) #if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 3, 0) static void sdfat_writepage_end_io(struct bio *bio) { #if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 13, 0) __sdfat_writepage_end_io(bio, bio->bi_status); } #elif LINUX_VERSION_CODE >= KERNEL_VERSION(4, 3, 0) static void sdfat_writepage_end_io(struct bio *bio) { #else /* LINUX_VERSION_CODE < KERNEL_VERSION(4, 13, 0) */ __sdfat_writepage_end_io(bio, bio->bi_error); #endif } #else /* LINUX_VERSION_CODE < KERNEL_VERSION(4, 3, 0) */ static void sdfat_writepage_end_io(struct bio *bio, int err) Loading Loading @@ -3452,7 +3451,11 @@ static inline void sdfat_submit_fullpage_bio(struct block_device *bdev, */ bio = bio_alloc(GFP_NOIO, 1); #if LINUX_VERSION_CODE >= KERNEL_VERSION(4,14,0) bio_set_dev(bio, bdev); #else bio->bi_bdev = bdev; #endif bio->bi_vcnt = 1; bio->bi_io_vec[0].bv_page = page; /* Inline vec */ bio->bi_io_vec[0].bv_len = length; /* PAGE_SIZE */ Loading Loading
mpage.c +9 −2 Original line number Diff line number Diff line Loading @@ -94,7 +94,11 @@ static inline void __sdfat_submit_bio_write2(int flags, struct bio *bio) #if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 3, 0) static void mpage_write_end_io(struct bio *bio) { __mpage_write_end_io(bio, bio->bi_error); #if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 13, 0) __sdfat_writepage_end_io(bio, bio->bi_status); #else /* LINUX_VERSION_CODE < KERNEL_VERSION(4, 13, 0) */ __sdfat_writepage_end_io(bio, bio->bi_error); #endif } #else /* LINUX_VERSION_CODE < KERNEL_VERSION(4,3,0) */ static void mpage_write_end_io(struct bio *bio, int err) Loading Loading @@ -277,7 +281,11 @@ mpage_alloc(struct block_device *bdev, } if (bio) { #if LINUX_VERSION_CODE >= KERNEL_VERSION(4,14,0) bio_set_dev(bio, bdev); #else bio->bi_bdev = bdev; #endif __sdfat_set_bio_sector(bio, first_sector); } return bio; Loading Loading @@ -604,4 +612,3 @@ int sdfat_mpage_writepages(struct address_space *mapping, } #endif /* CONFIG_SDFAT_ALIGNED_MPAGE_WRITE */
sdfat.c +8 −5 Original line number Diff line number Diff line Loading @@ -216,15 +216,14 @@ static inline void inode_unlock(struct inode *inode) #endif #if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 13, 0) #if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 3, 0) static void sdfat_writepage_end_io(struct bio *bio) { #if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 13, 0) __sdfat_writepage_end_io(bio, bio->bi_status); } #elif LINUX_VERSION_CODE >= KERNEL_VERSION(4, 3, 0) static void sdfat_writepage_end_io(struct bio *bio) { #else /* LINUX_VERSION_CODE < KERNEL_VERSION(4, 13, 0) */ __sdfat_writepage_end_io(bio, bio->bi_error); #endif } #else /* LINUX_VERSION_CODE < KERNEL_VERSION(4, 3, 0) */ static void sdfat_writepage_end_io(struct bio *bio, int err) Loading Loading @@ -3452,7 +3451,11 @@ static inline void sdfat_submit_fullpage_bio(struct block_device *bdev, */ bio = bio_alloc(GFP_NOIO, 1); #if LINUX_VERSION_CODE >= KERNEL_VERSION(4,14,0) bio_set_dev(bio, bdev); #else bio->bi_bdev = bdev; #endif bio->bi_vcnt = 1; bio->bi_io_vec[0].bv_page = page; /* Inline vec */ bio->bi_io_vec[0].bv_len = length; /* PAGE_SIZE */ Loading