aboutsummaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
Diffstat (limited to 'net')
-rw-r--r--net/sunrpc/cache.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/net/sunrpc/cache.c b/net/sunrpc/cache.c
index ade8a7e99cd3..1a50dfe6dc6e 100644
--- a/net/sunrpc/cache.c
+++ b/net/sunrpc/cache.c
@@ -255,7 +255,7 @@ int cache_check(struct cache_detail *detail,
255 } 255 }
256 256
257 if (rv == -EAGAIN) { 257 if (rv == -EAGAIN) {
258 if (cache_defer_req(rqstp, h) == 0) { 258 if (cache_defer_req(rqstp, h) < 0) {
259 /* Request is not deferred */ 259 /* Request is not deferred */
260 rv = cache_is_valid(detail, h); 260 rv = cache_is_valid(detail, h);
261 if (rv == -EAGAIN) 261 if (rv == -EAGAIN)
@@ -511,11 +511,11 @@ static int cache_defer_req(struct cache_req *req, struct cache_head *item)
511 * or continue and drop the oldest below 511 * or continue and drop the oldest below
512 */ 512 */
513 if (net_random()&1) 513 if (net_random()&1)
514 return 0; 514 return -ENOMEM;
515 } 515 }
516 dreq = req->defer(req); 516 dreq = req->defer(req);
517 if (dreq == NULL) 517 if (dreq == NULL)
518 return 0; 518 return -ENOMEM;
519 519
520 dreq->item = item; 520 dreq->item = item;
521 521
@@ -545,9 +545,9 @@ static int cache_defer_req(struct cache_req *req, struct cache_head *item)
545 if (!test_bit(CACHE_PENDING, &item->flags)) { 545 if (!test_bit(CACHE_PENDING, &item->flags)) {
546 /* must have just been validated... */ 546 /* must have just been validated... */
547 cache_revisit_request(item); 547 cache_revisit_request(item);
548 return 0; 548 return -EAGAIN;
549 } 549 }
550 return 1; 550 return 0;
551} 551}
552 552
553static void cache_revisit_request(struct cache_head *item) 553static void cache_revisit_request(struct cache_head *item)