open-cas-linux/configure.d/1_module_mutex.conf
Gal Hammer fea5e72d8c configure/module_mutex: adapt to kernel 5.12
The module_mutex is internal to the module loader since kernel
commit 922f2a7c.

Signed-off-by: Gal Hammer <gal.hammer@huawei.com>
Signed-off-by: Shai Fultheim <shai.fultheim@huawei.com>
Signed-off-by: Robert Baldyga <robert.baldyga@intel.com>
2022-03-07 09:41:59 +01:00

33 lines
532 B
Bash

#!/bin/bash
#
# Copyright(c) 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 "mutex_lock(&module_mutex);" "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 "MODULE_MUTEX_SUPPORTED 1" ;;
"2")
;;
*)
exit 1
esac
}
conf_run $@