linuxkpi: Defaults to get_file_rcu() version from Linux 6.7
To use the old version, one has to explicitly set `LINUXKPI_VERSION` to the expected version of Linux KPI. Reported by: bz Reviewed by: bz Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D48860
This commit is contained in:
parent
cdb24fbb0a
commit
585cdb74f4
2 changed files with 5 additions and 5 deletions
|
|
@ -264,17 +264,17 @@ get_file(struct linux_file *f)
|
|||
return (f);
|
||||
}
|
||||
|
||||
struct linux_file * linux67_get_file_rcu(struct linux_file **f);
|
||||
struct linux_file * linux_get_file_rcu(struct linux_file **f);
|
||||
struct linux_file * get_file_active(struct linux_file **f);
|
||||
#if defined(LINUXKPI_VERSION) && LINUXKPI_VERSION >= 60700
|
||||
#define get_file_rcu(f) linux67_get_file_rcu(f)
|
||||
#else
|
||||
#if defined(LINUXKPI_VERSION) && LINUXKPI_VERSION < 60700
|
||||
static inline bool
|
||||
get_file_rcu(struct linux_file *f)
|
||||
{
|
||||
return (refcount_acquire_if_not_zero(
|
||||
f->_file == NULL ? &f->f_count : &f->_file->f_count));
|
||||
}
|
||||
#else
|
||||
#define get_file_rcu(f) linux_get_file_rcu(f)
|
||||
#endif
|
||||
|
||||
static inline struct inode *
|
||||
|
|
|
|||
|
|
@ -1105,7 +1105,7 @@ __get_file_rcu(struct linux_file **f)
|
|||
}
|
||||
|
||||
struct linux_file *
|
||||
linux67_get_file_rcu(struct linux_file **f)
|
||||
linux_get_file_rcu(struct linux_file **f)
|
||||
{
|
||||
struct linux_file *file1;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue