From: NeilBrown Date: Wed, 3 Feb 2010 06:31:31 +0000 (+1100) Subject: sunrpc: never return expired entries in sunrpc_cache_lookup X-Git-Tag: v2.6.35-rc1~489^2~37 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d202cce8963d9268ff355a386e20243e8332b308;p=pandora-kernel.git sunrpc: never return expired entries in sunrpc_cache_lookup If sunrpc_cache_lookup finds an expired entry, remove it from the cache and return a freshly created non-VALID entry instead. This ensures that we only ever get a usable entry, or an entry that will become usable once an update arrives. i.e. we will never need to repeat the lookup. This allows us to remove the 'is_expired' test from cache_check (i.e. from cache_is_valid). cache_check should never get an expired entry as 'lookup' will never return one. If it does happen - due to inconvenient timing - then just accept it as still valid, it won't be very much past it's use-by date. Signed-off-by: NeilBrown Signed-off-by: J. Bruce Fields --- Reading git-diff-tree failed