mirror of
https://github.com/SCST-project/scst.git
synced 2026-05-14 09:11:27 +00:00
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:
@@ -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
|
||||
|
||||
/*
|
||||
|
||||
Reference in New Issue
Block a user