summaryrefslogtreecommitdiff
path: root/include/linux
diff options
context:
space:
mode:
authorNeil Brown <neilb@cse.unsw.edu.au>2004-08-22 23:00:59 -0700
committerLinus Torvalds <torvalds@ppc970.osdl.org>2004-08-22 23:00:59 -0700
commit086aa2c5b81b0bf6af86a136f295bca6aad70680 (patch)
treec2cbad328732a056db5ee813dfbc5c64d6de24e9 /include/linux
parent0be5edbc2e0626ec327a29ee9555fd93f6332dc4 (diff)
[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>
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/sunrpc/cache.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/include/linux/sunrpc/cache.h b/include/linux/sunrpc/cache.h
index a98b1981fc0a..04ac3afcc6a9 100644
--- a/include/linux/sunrpc/cache.h
+++ b/include/linux/sunrpc/cache.h
@@ -161,6 +161,10 @@ struct cache_deferred_req {
* INIT copies key information from "item" to "new"
* UPDATE copies content information from "item" to "tmp"
* INPLACE is true if updates can happen inplace rather than allocating a new structure
+ *
+ * WARNING: any substantial changes to this must be reflected in
+ * net/sunrpc/svcauth.c(auth_domain_lookup)
+ * which is a similar routine that is open-coded.
*/
#define DefineCacheLookup(RTN,MEMBER,FNAME,ARGS,SETUP,DETAIL,HASHFN,TEST,INIT,UPDATE,INPLACE) \
RTN *FNAME ARGS \