+ if (!UC_CACHE_IS_ACQUIRING(entry)) {
+ if (UC_CACHE_IS_VALID(entry)) {
+ /* This should not happen, just give a warning
+ * at this moment.
+ */
+ CWARN("%s: entry %p(key "LPU64", cur %lu, ex %ld/%ld) "
+ "already valid\n", cache->uc_name,
+ entry, entry->ue_key, get_seconds(),
+ entry->ue_acquire_expire, entry->ue_expire);
+ GOTO(out, rc = 0);
+ }
+
+ CWARN("%s: stale entry %p: key "LPU64", ref %d, fl %u, "
+ "cur %lu, ex %ld/%ld\n",
+ cache->uc_name, entry, entry->ue_key,
+ atomic_read(&entry->ue_refcount),
+ entry->ue_flags, get_seconds(),
+ entry->ue_acquire_expire, entry->ue_expire);
+ GOTO(out, rc = -EINVAL);
+ }
+