mirror of
https://github.com/versity/scoutfs.git
synced 2026-08-16 04:06:39 +00:00
In v6.6-rc5-1-g077c212f0344, one can no longer directly access the inode m_time and a_time etc. We have to go through these static inline functions to get to them. Further back, ctime accessors were added in v6.5-rc1-7-g9b6304c1d537, and need to be applied as well. Signed-off-by: Auke Kok <auke.kok@versity.com>
49 lines
1.1 KiB
C
49 lines
1.1 KiB
C
|
|
#include <linux/uio.h>
|
|
|
|
#include "kernelcompat.h"
|
|
|
|
#include <linux/list_lru.h>
|
|
|
|
#ifdef KC_LIST_LRU_WALK_CB_LIST_LOCK
|
|
static enum lru_status kc_isolate(struct list_head *item, struct list_lru_one *list,
|
|
spinlock_t *lock, void *cb_arg)
|
|
{
|
|
struct kc_isolate_args *args = cb_arg;
|
|
|
|
return args->isolate(item, list, args->cb_arg);
|
|
}
|
|
|
|
unsigned long kc_list_lru_walk(struct list_lru *lru, kc_list_lru_walk_cb_t isolate, void *cb_arg,
|
|
unsigned long nr_to_walk)
|
|
{
|
|
struct kc_isolate_args args = {
|
|
.isolate = isolate,
|
|
.cb_arg = cb_arg,
|
|
};
|
|
|
|
return list_lru_walk(lru, kc_isolate, &args, nr_to_walk);
|
|
}
|
|
unsigned long kc_list_lru_shrink_walk(struct list_lru *lru, struct shrink_control *sc,
|
|
kc_list_lru_walk_cb_t isolate, void *cb_arg)
|
|
{
|
|
struct kc_isolate_args args = {
|
|
.isolate = isolate,
|
|
.cb_arg = cb_arg,
|
|
};
|
|
|
|
return list_lru_shrink_walk(lru, sc, kc_isolate, &args);
|
|
}
|
|
|
|
#endif
|
|
|
|
#ifndef KC_FS_INODE_C_TIME_ACCESSOR
|
|
struct timespec64 inode_set_ctime_current(struct inode *inode)
|
|
{
|
|
struct timespec64 now = current_time(inode);
|
|
|
|
inode_set_ctime(inode, now.tv_sec, now.tv_nsec);
|
|
return now;
|
|
}
|
|
#endif
|