static int check_unlink_entry(struct upcall_cache *cache,
struct upcall_cache_entry *entry)
{
static int check_unlink_entry(struct upcall_cache *cache,
struct upcall_cache_entry *entry)
{
- if (UC_CACHE_IS_VALID(entry) &&
- cfs_time_before(cfs_time_current(), entry->ue_expire))
+ time64_t now = ktime_get_seconds();
+
+ if (UC_CACHE_IS_VALID(entry) && now < entry->ue_expire)
spin_unlock(&cache->uc_lock);
rc = refresh_entry(cache, entry);
spin_lock(&cache->uc_lock);
spin_unlock(&cache->uc_lock);
rc = refresh_entry(cache, entry);
spin_lock(&cache->uc_lock);
UC_CACHE_SET_VALID(entry);
CDEBUG(D_OTHER, "%s: created upcall cache entry %p for key %llu\n",
cache->uc_name, entry, entry->ue_key);
UC_CACHE_SET_VALID(entry);
CDEBUG(D_OTHER, "%s: created upcall cache entry %p for key %llu\n",
cache->uc_name, entry, entry->ue_key);
if (found) {
CWARN("%s: flush entry %p: key %llu, ref %d, fl %x, "
if (found) {
CWARN("%s: flush entry %p: key %llu, ref %d, fl %x, "
cache->uc_name, entry, entry->ue_key,
atomic_read(&entry->ue_refcount), entry->ue_flags,
cache->uc_name, entry, entry->ue_key,
atomic_read(&entry->ue_refcount), entry->ue_flags,