Skip to content

Commit

Permalink
Merge pull request #1485 from robertbaldyga/v22.6.3-5.15-ubuntu-fix
Browse files Browse the repository at this point in the history
[v22.6.3] Add proper support for kernel 5.15
  • Loading branch information
robertbaldyga authored Jul 25, 2024
2 parents dd70e50 + f27d59a commit 08ed69a
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 2 deletions.
32 changes: 32 additions & 0 deletions configure.d/1_module_put_and_exit.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
#!/bin/bash
#
# Copyright(c) 2012-2022 Intel Corporation
# SPDX-License-Identifier: BSD-3-Clause
#

. $(dirname $3)/conf_framework


check() {
cur_name=$(basename $2)
config_file_path=$1
if compile_module $cur_name "module_put_and_kthread_exit(0);" "linux/module.h"
then
echo $cur_name 1 >> $config_file_path
else
echo $cur_name 2 >> $config_file_path
fi
}

apply() {
case "$1" in
"1")
add_define "CAS_MODULE_PUT_AND_EXIT(code) module_put_and_kthread_exit(code)" ;;
"2")
add_define "CAS_MODULE_PUT_AND_EXIT(code) module_put_and_exit(code)" ;;
*)
exit 1
esac
}

conf_run $@
4 changes: 2 additions & 2 deletions modules/cas_cache/layer_cache_management.c
Original file line number Diff line number Diff line change
Expand Up @@ -601,7 +601,7 @@ static int exit_instance_finish(void *data)
if (result == -KCAS_ERR_WAITING_INTERRUPTED)
kfree(ctx);

module_put_and_exit(0);
CAS_MODULE_PUT_AND_EXIT(0);
}

struct _cache_mngt_attach_context {
Expand Down Expand Up @@ -649,7 +649,7 @@ static int cache_start_rollback(void *data)
if (result == -KCAS_ERR_WAITING_INTERRUPTED)
kfree(ctx);

module_put_and_exit(0);
CAS_MODULE_PUT_AND_EXIT(0);

return 0;
}
Expand Down

0 comments on commit 08ed69a

Please sign in to comment.