2005-03-08 06:07:24

by NeilBrown

[permalink] [raw]
Subject: [PATCH kNFSd 24 of 54] nfsd4: simplify verify_clientid



Simplify verify_clientid out of existance.

Signed-off-by: J. Bruce Fields <[email protected]>
Signed-off-by: Neil Brown <[email protected]>

### Diffstat output
./fs/nfsd/nfs4state.c | 18 ++----------------
1 files changed, 2 insertions(+), 16 deletions(-)

diff ./fs/nfsd/nfs4state.c~current~ ./fs/nfsd/nfs4state.c
--- ./fs/nfsd/nfs4state.c~current~ 2005-03-07 11:35:57.000000000 +1100
+++ ./fs/nfsd/nfs4state.c 2005-03-07 11:35:57.000000000 +1100
@@ -1247,21 +1247,6 @@ find_openstateowner_str(unsigned int has
return 0;
}

-/* see if clientid is in confirmed hash table */
-static int
-verify_clientid(struct nfs4_client **client, clientid_t *clid) {
-
- struct nfs4_client *clp;
-
- clp = find_confirmed_client(clid);
- if (clp) {
- *client = clp;
- return 1;
- }
- *client = NULL;
- return 0;
-}
-
/* search file_hashtbl[] for file */
static int
find_file(unsigned int hashval, struct inode *ino, struct nfs4_file **fp) {
@@ -1514,7 +1499,8 @@ nfsd4_process_open1(struct nfsd4_open *o
* client's lease expiring.
*/
status = nfserr_expired;
- if (!verify_clientid(&clp, clientid))
+ clp = find_confirmed_client(clientid);
+ if (clp == NULL)
goto out;
}
status = nfserr_resource;


-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
_______________________________________________
NFS maillist - [email protected]
https://lists.sourceforge.net/lists/listinfo/nfs