diff options
author | NeilBrown <neilb@suse.de> | 2010-10-07 15:29:46 +1100 |
---|---|---|
committer | J. Bruce Fields <bfields@redhat.com> | 2010-10-11 19:30:27 -0400 |
commit | d29068c431599fa96729556846562eb18429092d (patch) | |
tree | 6330502e1a6247de1cb785fe44ab599662cb369c /net/econet | |
parent | 33515142156efc9ab5dbfe93ff8d4765559dc987 (diff) |
sunrpc: Simplify cache_defer_req and related functions.
The return value from cache_defer_req is somewhat confusing.
Various different error codes are returned, but the single caller is
only interested in success or failure.
In fact it can measure this success or failure itself by checking
CACHE_PENDING, which makes the point of the code more explicit.
So change cache_defer_req to return 'void' and test CACHE_PENDING
after it completes, to see if the request was actually deferred or
not.
Similarly setup_deferral and cache_wait_req don't need a return value,
so make them void and remove some code.
The call to cache_revisit_request (to guard against a race) is only
needed for the second call to setup_deferral, so move it out of
setup_deferral to after that second call. With the first call the
race is handled differently (by explicitly calling
'wait_for_completion').
Signed-off-by: NeilBrown <neilb@suse.de>
Signed-off-by: J. Bruce Fields <bfields@redhat.com>
Diffstat (limited to 'net/econet')
0 files changed, 0 insertions, 0 deletions