diff options
author | Benny Halevy <bhalevy@panasas.com> | 2011-10-19 22:12:58 -0400 |
---|---|---|
committer | J. Bruce Fields <bfields@redhat.com> | 2011-10-24 04:24:27 -0400 |
commit | 5423732a71577f7860c56a4eea2c34ff162ddd73 (patch) | |
tree | 5d7af992af7ff974796288272ce2604dad8f1284 /fs/nfsd/nfs4callback.c | |
parent | 8b289b2c2355c3bea75f3e499b4aa251a3191382 (diff) |
nfsd41: use SEQ4_STATUS_BACKCHANNEL_FAULT when cb_sequence is invalid
Signed-off-by: Benny Halevy <bhalevy@panasas.com>
Signed-off-by: J. Bruce Fields <bfields@redhat.com>
Diffstat (limited to 'fs/nfsd/nfs4callback.c')
-rw-r--r-- | fs/nfsd/nfs4callback.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/fs/nfsd/nfs4callback.c b/fs/nfsd/nfs4callback.c index de018ecadae6..7748d6a18d97 100644 --- a/fs/nfsd/nfs4callback.c +++ b/fs/nfsd/nfs4callback.c | |||
@@ -39,6 +39,8 @@ | |||
39 | 39 | ||
40 | #define NFSDDBG_FACILITY NFSDDBG_PROC | 40 | #define NFSDDBG_FACILITY NFSDDBG_PROC |
41 | 41 | ||
42 | static void nfsd4_mark_cb_fault(struct nfs4_client *, int reason); | ||
43 | |||
42 | #define NFSPROC4_CB_NULL 0 | 44 | #define NFSPROC4_CB_NULL 0 |
43 | #define NFSPROC4_CB_COMPOUND 1 | 45 | #define NFSPROC4_CB_COMPOUND 1 |
44 | 46 | ||
@@ -460,6 +462,8 @@ static int decode_cb_sequence4resok(struct xdr_stream *xdr, | |||
460 | */ | 462 | */ |
461 | status = 0; | 463 | status = 0; |
462 | out: | 464 | out: |
465 | if (status) | ||
466 | nfsd4_mark_cb_fault(cb->cb_clp, status); | ||
463 | return status; | 467 | return status; |
464 | out_overflow: | 468 | out_overflow: |
465 | print_overflow_msg(__func__, xdr); | 469 | print_overflow_msg(__func__, xdr); |
@@ -686,6 +690,12 @@ static void nfsd4_mark_cb_down(struct nfs4_client *clp, int reason) | |||
686 | warn_no_callback_path(clp, reason); | 690 | warn_no_callback_path(clp, reason); |
687 | } | 691 | } |
688 | 692 | ||
693 | static void nfsd4_mark_cb_fault(struct nfs4_client *clp, int reason) | ||
694 | { | ||
695 | clp->cl_cb_state = NFSD4_CB_FAULT; | ||
696 | warn_no_callback_path(clp, reason); | ||
697 | } | ||
698 | |||
689 | static void nfsd4_cb_probe_done(struct rpc_task *task, void *calldata) | 699 | static void nfsd4_cb_probe_done(struct rpc_task *task, void *calldata) |
690 | { | 700 | { |
691 | struct nfs4_client *clp = container_of(calldata, struct nfs4_client, cl_cb_null); | 701 | struct nfs4_client *clp = container_of(calldata, struct nfs4_client, cl_cb_null); |