scst/include/backport.h: Port READ_REF_COUNT() to Linux kernel v5.10

git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9190 d57e44dd-8a1f-0410-8b47-8ef2f437770f
This commit is contained in:
Bart Van Assche
2020-11-23 15:59:23 +00:00
parent fd5b318880
commit e93e3cd2fb

View File

@@ -1184,7 +1184,11 @@ typedef unsigned percpu_count_t;
#define READ_REF_COUNT(ref) atomic_read(&(ref)->count)
#else
typedef unsigned long percpu_count_t;
#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 10, 0)
#define READ_REF_COUNT(ref) atomic_long_read(&(ref)->count)
#else
#define READ_REF_COUNT(ref) atomic_long_read(&(ref)->data->count)
#endif
#endif
/*