diff --git a/scst/include/backport.h b/scst/include/backport.h index 0ece4c6b0..2be9912bd 100644 --- a/scst/include/backport.h +++ b/scst/include/backport.h @@ -853,6 +853,17 @@ static inline void lockdep_unregister_key(struct lock_class_key *key) } #endif +/* + * See also commit 5facae4f3549 ("locking/lockdep: Remove unused @nested + * argument from lock_release()"). + */ +#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 5, 0) +#undef rwlock_release +#define rwlock_release(l, i) lock_release(l, 1, i) +#undef mutex_release +#define mutex_release(l, i) lock_release(l, 0, i) +#endif + /* */ #if LINUX_VERSION_CODE < KERNEL_VERSION(4, 3, 0) /* diff --git a/scst/src/scst_main.c b/scst/src/scst_main.c index b3a00f745..7ea991e17 100644 --- a/scst/src/scst_main.c +++ b/scst/src/scst_main.c @@ -979,7 +979,7 @@ out: if (res == 0) lock_acquired(&scst_suspend_dep_map, _RET_IP_); else - rwlock_release(&scst_suspend_dep_map, 1, _RET_IP_); + rwlock_release(&scst_suspend_dep_map, _RET_IP_); #endif TRACE_EXIT_RES(res); @@ -1059,7 +1059,7 @@ void scst_resume_activity(void) TRACE_ENTRY(); #if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 29) - rwlock_release(&scst_suspend_dep_map, 1, _RET_IP_); + rwlock_release(&scst_suspend_dep_map, _RET_IP_); #endif mutex_lock(&scst_suspend_mutex); diff --git a/scst/src/scst_sysfs.c b/scst/src/scst_sysfs.c index c756c39b9..3d6bc0432 100644 --- a/scst/src/scst_sysfs.c +++ b/scst/src/scst_sysfs.c @@ -464,7 +464,7 @@ static void scst_process_sysfs_works(void) #if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 29) if (work->dep_map) - mutex_release(work->dep_map, 0, _RET_IP_); + mutex_release(work->dep_map, _RET_IP_); #endif spin_lock(&sysfs_work_lock); @@ -1213,7 +1213,7 @@ void scst_kobject_put_and_wait(struct kobject *kobj, const char *category, out_free: #if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 29) lock_acquired(dep_map, _RET_IP_); - mutex_release(dep_map, 0, _RET_IP_); + mutex_release(dep_map, _RET_IP_); #endif kfree(name);