mirror of
https://github.com/SCST-project/scst.git
synced 2026-05-18 03:01:26 +00:00
fcst: Linux kernel v4.11 build fix
Linux kernel v4.11 build fix. Signed-off-by: Sebastian Herbszt <herbszt@gmx.de> git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7173 d57e44dd-8a1f-0410-8b47-8ef2f437770f
This commit is contained in:
@@ -482,7 +482,11 @@ static void ft_sess_free(struct kref *kref)
|
||||
static void ft_sess_put(struct ft_sess *sess)
|
||||
{
|
||||
BUG_ON(!sess);
|
||||
#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 11, 0)
|
||||
BUG_ON(kref_read(&sess->kref) <= 0);
|
||||
#else
|
||||
BUG_ON(atomic_read(&sess->kref.refcount) <= 0);
|
||||
#endif
|
||||
kref_put(&sess->kref, ft_sess_free);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user