diff options
Diffstat (limited to 'drivers/net/cassini.c')
-rw-r--r-- | drivers/net/cassini.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/drivers/net/cassini.c b/drivers/net/cassini.c index 83768df27806..f1936d51b458 100644 --- a/drivers/net/cassini.c +++ b/drivers/net/cassini.c | |||
@@ -576,6 +576,18 @@ static void cas_spare_recover(struct cas *cp, const gfp_t flags) | |||
576 | list_for_each_safe(elem, tmp, &list) { | 576 | list_for_each_safe(elem, tmp, &list) { |
577 | cas_page_t *page = list_entry(elem, cas_page_t, list); | 577 | cas_page_t *page = list_entry(elem, cas_page_t, list); |
578 | 578 | ||
579 | /* | ||
580 | * With the lockless pagecache, cassini buffering scheme gets | ||
581 | * slightly less accurate: we might find that a page has an | ||
582 | * elevated reference count here, due to a speculative ref, | ||
583 | * and skip it as in-use. Ideally we would be able to reclaim | ||
584 | * it. However this would be such a rare case, it doesn't | ||
585 | * matter too much as we should pick it up the next time round. | ||
586 | * | ||
587 | * Importantly, if we find that the page has a refcount of 1 | ||
588 | * here (our refcount), then we know it is definitely not inuse | ||
589 | * so we can reuse it. | ||
590 | */ | ||
579 | if (page_count(page->buffer) > 1) | 591 | if (page_count(page->buffer) > 1) |
580 | continue; | 592 | continue; |
581 | 593 | ||