mirror of
https://github.com/versity/scoutfs.git
synced 2026-08-15 19:56:36 +00:00
Merge pull request #318 from versity/auke/timer_container_of
Use timer_container_of with fallback for from_timer -> el9.8 support
This commit is contained in:
@@ -496,3 +496,12 @@ endif
|
||||
ifneq (,$(shell grep 'struct posix_acl.*get_inode_acl' include/linux/fs.h))
|
||||
ccflags-y += -DKC_GET_INODE_ACL
|
||||
endif
|
||||
|
||||
#
|
||||
# v6.15-13744-g41cb08555c41
|
||||
#
|
||||
# from_timer renamed to timer_container_of.
|
||||
#
|
||||
ifneq (,$(shell grep 'define timer_container_of' include/linux/timer.h))
|
||||
ccflags-y += -DKC_TIMER_CONTAINER_OF
|
||||
endif
|
||||
|
||||
+1
-1
@@ -222,7 +222,7 @@ static struct attribute *fence_attrs[] = {
|
||||
|
||||
static void fence_timeout(struct timer_list *timer)
|
||||
{
|
||||
struct pending_fence *fence = from_timer(fence, timer, timer);
|
||||
struct pending_fence *fence = timer_container_of(fence, timer, timer);
|
||||
struct super_block *sb = fence->sb;
|
||||
DECLARE_FENCE_INFO(sb, fi);
|
||||
|
||||
|
||||
@@ -489,4 +489,9 @@ static inline void stack_trace_print(unsigned long *entries, unsigned int nr_ent
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifndef KC_TIMER_CONTAINER_OF
|
||||
#define timer_container_of(var, callback_timer, timer_fieldname) \
|
||||
from_timer(var, callback_timer, timer_fieldname)
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
+1
-1
@@ -134,7 +134,7 @@ static int recov_finished(struct recov_info *recinf)
|
||||
|
||||
static void timer_callback(struct timer_list *timer)
|
||||
{
|
||||
struct recov_info *recinf = from_timer(recinf, timer, timer);
|
||||
struct recov_info *recinf = timer_container_of(recinf, timer, timer);
|
||||
|
||||
recinf->timeout_fn(recinf->sb);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user