@@ -281,21 +281,7 @@ static int try_to_negate_entry(struct cache_detail *detail, struct cache_head *h
281
281
return rv ;
282
282
}
283
283
284
- /*
285
- * This is the generic cache management routine for all
286
- * the authentication caches.
287
- * It checks the currency of a cache item and will (later)
288
- * initiate an upcall to fill it if needed.
289
- *
290
- *
291
- * Returns 0 if the cache_head can be used, or cache_puts it and returns
292
- * -EAGAIN if upcall is pending and request has been queued
293
- * -ETIMEDOUT if upcall failed or request could not be queue or
294
- * upcall completed but item is still invalid (implying that
295
- * the cache item has been replaced with a newer one).
296
- * -ENOENT if cache entry was negative
297
- */
298
- int cache_check (struct cache_detail * detail ,
284
+ int cache_check_rcu (struct cache_detail * detail ,
299
285
struct cache_head * h , struct cache_req * rqstp )
300
286
{
301
287
int rv ;
@@ -336,6 +322,31 @@ int cache_check(struct cache_detail *detail,
336
322
rv = - ETIMEDOUT ;
337
323
}
338
324
}
325
+
326
+ return rv ;
327
+ }
328
+ EXPORT_SYMBOL_GPL (cache_check_rcu );
329
+
330
+ /*
331
+ * This is the generic cache management routine for all
332
+ * the authentication caches.
333
+ * It checks the currency of a cache item and will (later)
334
+ * initiate an upcall to fill it if needed.
335
+ *
336
+ *
337
+ * Returns 0 if the cache_head can be used, or cache_puts it and returns
338
+ * -EAGAIN if upcall is pending and request has been queued
339
+ * -ETIMEDOUT if upcall failed or request could not be queue or
340
+ * upcall completed but item is still invalid (implying that
341
+ * the cache item has been replaced with a newer one).
342
+ * -ENOENT if cache entry was negative
343
+ */
344
+ int cache_check (struct cache_detail * detail ,
345
+ struct cache_head * h , struct cache_req * rqstp )
346
+ {
347
+ int rv ;
348
+
349
+ rv = cache_check_rcu (detail , h , rqstp );
339
350
if (rv )
340
351
cache_put (h , detail );
341
352
return rv ;
0 commit comments