diff options
author | NeilBrown <neilb@cse.unsw.edu.au> | 2005-06-24 01:04:23 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@ppc970.osdl.org> | 2005-06-24 03:06:35 -0400 |
commit | cb36d6345752fa24827044c68e15f6708a40d9f6 (patch) | |
tree | adc6b7201525c87685815037cfa5fd1c248f6e95 /fs/nfsd | |
parent | 3e9e3dbe0fe36c824ce2c5d7b05997c87a64bbdc (diff) |
[PATCH] knfsd: nfsd4: remove cb_parsed
The cb_parsed field is only used by probe_callback, to determine whether the
callback information has been filled in by setclientid. But there is no way
that probe_callback() can be called without that having already happened, so
that check is superfluous, as is cb_parsed.
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 'fs/nfsd')
-rw-r--r-- | fs/nfsd/nfs4callback.c | 4 | ||||
-rw-r--r-- | fs/nfsd/nfs4state.c | 5 |
2 files changed, 2 insertions, 7 deletions
diff --git a/fs/nfsd/nfs4callback.c b/fs/nfsd/nfs4callback.c index 68bb245491f6..583c0710e45e 100644 --- a/fs/nfsd/nfs4callback.c +++ b/fs/nfsd/nfs4callback.c | |||
@@ -386,9 +386,7 @@ nfsd4_probe_callback(struct nfs4_client *clp) | |||
386 | char hostname[32]; | 386 | char hostname[32]; |
387 | int status; | 387 | int status; |
388 | 388 | ||
389 | dprintk("NFSD: probe_callback. cb_parsed %d cb_set %d\n", | 389 | if (atomic_read(&cb->cb_set)) |
390 | cb->cb_parsed, atomic_read(&cb->cb_set)); | ||
391 | if (!cb->cb_parsed || atomic_read(&cb->cb_set)) | ||
392 | return; | 390 | return; |
393 | 391 | ||
394 | /* Initialize address */ | 392 | /* Initialize address */ |
diff --git a/fs/nfsd/nfs4state.c b/fs/nfsd/nfs4state.c index 26d00465c28a..0b47a97e953d 100644 --- a/fs/nfsd/nfs4state.c +++ b/fs/nfsd/nfs4state.c | |||
@@ -377,7 +377,6 @@ create_client(struct xdr_netobj name, char *recdir) { | |||
377 | memcpy(clp->cl_recdir, recdir, HEXDIR_LEN); | 377 | memcpy(clp->cl_recdir, recdir, HEXDIR_LEN); |
378 | atomic_set(&clp->cl_count, 1); | 378 | atomic_set(&clp->cl_count, 1); |
379 | atomic_set(&clp->cl_callback.cb_set, 0); | 379 | atomic_set(&clp->cl_callback.cb_set, 0); |
380 | clp->cl_callback.cb_parsed = 0; | ||
381 | INIT_LIST_HEAD(&clp->cl_idhash); | 380 | INIT_LIST_HEAD(&clp->cl_idhash); |
382 | INIT_LIST_HEAD(&clp->cl_strhash); | 381 | INIT_LIST_HEAD(&clp->cl_strhash); |
383 | INIT_LIST_HEAD(&clp->cl_openowners); | 382 | INIT_LIST_HEAD(&clp->cl_openowners); |
@@ -620,14 +619,12 @@ gen_callback(struct nfs4_client *clp, struct nfsd4_setclientid *se) | |||
620 | goto out_err; | 619 | goto out_err; |
621 | cb->cb_prog = se->se_callback_prog; | 620 | cb->cb_prog = se->se_callback_prog; |
622 | cb->cb_ident = se->se_callback_ident; | 621 | cb->cb_ident = se->se_callback_ident; |
623 | cb->cb_parsed = 1; | ||
624 | return; | 622 | return; |
625 | out_err: | 623 | out_err: |
626 | printk(KERN_INFO "NFSD: this client (clientid %08x/%08x) " | 624 | printk(KERN_INFO "NFSD: this client (clientid %08x/%08x) " |
627 | "will not receive delegations\n", | 625 | "will not receive delegations\n", |
628 | clp->cl_clientid.cl_boot, clp->cl_clientid.cl_id); | 626 | clp->cl_clientid.cl_boot, clp->cl_clientid.cl_id); |
629 | 627 | ||
630 | cb->cb_parsed = 0; | ||
631 | return; | 628 | return; |
632 | } | 629 | } |
633 | 630 | ||
@@ -872,7 +869,7 @@ nfsd4_setclientid_confirm(struct svc_rqst *rqstp, struct nfsd4_setclientid_confi | |||
872 | else { | 869 | else { |
873 | /* XXX: We just turn off callbacks until we can handle | 870 | /* XXX: We just turn off callbacks until we can handle |
874 | * change request correctly. */ | 871 | * change request correctly. */ |
875 | conf->cl_callback.cb_parsed = 0; | 872 | atomic_set(&conf->cl_callback.cb_set, 0); |
876 | gen_confirm(conf); | 873 | gen_confirm(conf); |
877 | expire_client(unconf); | 874 | expire_client(unconf); |
878 | status = nfs_ok; | 875 | status = nfs_ok; |