Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 164634
b: refs/heads/master
c: 9e4c637
h: refs/heads/master
v: v3
  • Loading branch information
NeilBrown authored and J. Bruce Fields committed Sep 11, 2009
1 parent b50df54 commit e70b9ae
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 4cfc7e6019caa3e97d2a81c48c8d575d7b38d751
refs/heads/master: 9e4c6379a62d94d3362b12c7a00f2105df6d7eeb
10 changes: 5 additions & 5 deletions trunk/net/sunrpc/cache.c
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,7 @@ int cache_check(struct cache_detail *detail,
}

if (rv == -EAGAIN) {
if (cache_defer_req(rqstp, h) == 0) {
if (cache_defer_req(rqstp, h) < 0) {
/* Request is not deferred */
rv = cache_is_valid(detail, h);
if (rv == -EAGAIN)
Expand Down Expand Up @@ -511,11 +511,11 @@ static int cache_defer_req(struct cache_req *req, struct cache_head *item)
* or continue and drop the oldest below
*/
if (net_random()&1)
return 0;
return -ENOMEM;
}
dreq = req->defer(req);
if (dreq == NULL)
return 0;
return -ENOMEM;

dreq->item = item;

Expand Down Expand Up @@ -545,9 +545,9 @@ static int cache_defer_req(struct cache_req *req, struct cache_head *item)
if (!test_bit(CACHE_PENDING, &item->flags)) {
/* must have just been validated... */
cache_revisit_request(item);
return 0;
return -EAGAIN;
}
return 1;
return 0;
}

static void cache_revisit_request(struct cache_head *item)
Expand Down

0 comments on commit e70b9ae

Please sign in to comment.