From: Gleb C. <lna...@ya...> - 2023-07-19 08:37:19
|
Commit: 7a1d0dd GitHub URL: https://github.com/SCST-project/scst/commit/7a1d0ddaf53e3b7d709c17140302e1e139185f2c Author: Gleb Chesnokov Date: 2023-07-19T11:35:51+03:00 Log Message: ----------- qla2x00t-32gbit: Backport to older kernel versions Unbreak the build for the previous commit against kernel versions before v5.1. Modified Paths: -------------- scst/include/backport.h | 13 +++++++++++++ 1 file changed, 13 insertions(+) =================================================================== diff --git a/scst/include/backport.h b/scst/include/backport.h index 80683bc..4e693ae 100644 --- a/scst/include/backport.h +++ b/scst/include/backport.h @@ -687,6 +687,19 @@ static inline bool list_entry_in_list(const struct list_head *entry) return !list_empty(entry); } +#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 1, 0) && \ + (!defined(RHEL_RELEASE_CODE) || \ + RHEL_RELEASE_CODE -0 < RHEL_RELEASE_VERSION(8, 1)) +/* + * See also commit 70b44595eafe ("mm, compaction: use free lists to quickly + * locate a migration source") # v5.1. + */ +static inline int list_is_first(const struct list_head *list, const struct list_head *head) +{ + return list->prev == head; +} +#endif + /* <linux/lockdep.h> */ /* |