Merge pull request #1314 from kmajzero/4.15_build_fix

Fix for a build failure for Ubuntu 18.04 kernel 4.15
This commit is contained in:
Michał Mielewczyk 2022-08-18 15:32:47 +02:00 committed by GitHub
commit e40ca18d61
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -9,12 +9,15 @@
check() {
cur_name=$(basename $2)
config_file_path=$1
if compile_module $cur_name "bio_split(NULL, 0, 0, 0);" "linux/bio.h"
if compile_module $cur_name "bio_split(NULL, 0, 0, &fs_bio_set);" "linux/bio.h"
then
echo $cur_name "1" >> $config_file_path
elif compile_module $cur_name "bio_split(NULL, 0, 0, fs_bio_set);" "linux/bio.h"
then
echo $cur_name "2" >> $config_file_path
elif compile_module $cur_name "bio_split(NULL, 0);" "linux/bio.h"
then
echo $cur_name "2" >> $config_file_path
echo $cur_name "3" >> $config_file_path
else
echo $cur_name "X" >> $config_file_path
fi
@ -31,6 +34,12 @@ apply() {
"2")
add_function "
static inline struct bio *cas_bio_split(struct bio *bio, int sectors)
{
return bio_split(bio, sectors, GFP_NOIO, fs_bio_set);
}" ;;
"3")
add_function "
static inline struct bio *cas_bio_split(struct bio *bio, int sectors)
{
struct bio *split, copy;
int bytes = sectors << 9;