]> git.hungrycats.org Git - linux/commit
[PATCH] nfsd: simplify auth_domain_lookup
authorNeil Brown <neilb@cse.unsw.edu.au>
Mon, 23 Aug 2004 06:00:59 +0000 (23:00 -0700)
committerLinus Torvalds <torvalds@ppc970.osdl.org>
Mon, 23 Aug 2004 06:00:59 +0000 (23:00 -0700)
commit086aa2c5b81b0bf6af86a136f295bca6aad70680
treec2cbad328732a056db5ee813dfbc5c64d6de24e9
parent0be5edbc2e0626ec327a29ee9555fd93f6332dc4
[PATCH] nfsd: simplify auth_domain_lookup

The interface between the auth_domain and the cache code is messy; the
auth_domain code is the only real user of the full 11-argument
DefineCacheLookup, and does weird stuff with it (like passing in through one
of the arguments a bit of code with a conditional return).

We could further parametrize DefineCacheLookup, but I think it's already too
complicated.

My solution is to just ignore DefineCacheLookup and write the
auth_domain_lookup function from scratch.  It's actually a pretty short
function (much simpler than DefineCacheLookup itself), and it's much easier to
read this short function than it is to read some special-cased
DefineCacheLookup to verify that it does what it says it does....

Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
Signed-off-by: Neil Brown <neilb@cse.unsw.edu.au>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
include/linux/sunrpc/cache.h
net/sunrpc/svcauth.c