nfssvc.c (8be98d2f2a0a262f8bf8a0bc1fdf522b3c7aab17) nfssvc.c (16c663642c7ec03cd4cee5fec520bb69e97babe4)
1// SPDX-License-Identifier: GPL-2.0
2/*
3 * Central processing for nfsd.
4 *
5 * Authors: Olaf Kirch (okir@monad.swb.de)
6 *
7 * Copyright (C) 1995, 1996, 1997 Olaf Kirch <okir@monad.swb.de>
8 */

--- 389 unchanged lines hidden (view full) ---

398
399 ret = nfsd_file_cache_start_net(net);
400 if (ret)
401 goto out_lockd;
402 ret = nfs4_state_start_net(net);
403 if (ret)
404 goto out_filecache;
405
1// SPDX-License-Identifier: GPL-2.0
2/*
3 * Central processing for nfsd.
4 *
5 * Authors: Olaf Kirch (okir@monad.swb.de)
6 *
7 * Copyright (C) 1995, 1996, 1997 Olaf Kirch <okir@monad.swb.de>
8 */

--- 389 unchanged lines hidden (view full) ---

398
399 ret = nfsd_file_cache_start_net(net);
400 if (ret)
401 goto out_lockd;
402 ret = nfs4_state_start_net(net);
403 if (ret)
404 goto out_filecache;
405
406#ifdef CONFIG_NFSD_V4_2_INTER_SSC
407 nfsd4_ssc_init_umount_work(nn);
408#endif
406 nn->nfsd_net_up = true;
407 return 0;
408
409out_filecache:
410 nfsd_file_cache_shutdown_net(net);
411out_lockd:
412 if (nn->lockd_up) {
413 lockd_down(net);

--- 582 unchanged lines hidden (view full) ---

996 *
997 * Return values:
998 * %0: Processing complete; do not send a Reply
999 * %1: Processing complete; send Reply in rqstp->rq_res
1000 */
1001int nfsd_dispatch(struct svc_rqst *rqstp, __be32 *statp)
1002{
1003 const struct svc_procedure *proc = rqstp->rq_procinfo;
409 nn->nfsd_net_up = true;
410 return 0;
411
412out_filecache:
413 nfsd_file_cache_shutdown_net(net);
414out_lockd:
415 if (nn->lockd_up) {
416 lockd_down(net);

--- 582 unchanged lines hidden (view full) ---

999 *
1000 * Return values:
1001 * %0: Processing complete; do not send a Reply
1002 * %1: Processing complete; send Reply in rqstp->rq_res
1003 */
1004int nfsd_dispatch(struct svc_rqst *rqstp, __be32 *statp)
1005{
1006 const struct svc_procedure *proc = rqstp->rq_procinfo;
1004 struct kvec *argv = &rqstp->rq_arg.head[0];
1005 struct kvec *resv = &rqstp->rq_res.head[0];
1006 __be32 *p;
1007
1008 /*
1009 * Give the xdr decoder a chance to change this if it wants
1010 * (necessary in the NFSv4.0 compound case)
1011 */
1012 rqstp->rq_cachetype = proc->pc_cachetype;
1013
1014 svcxdr_init_decode(rqstp);
1007 struct kvec *resv = &rqstp->rq_res.head[0];
1008 __be32 *p;
1009
1010 /*
1011 * Give the xdr decoder a chance to change this if it wants
1012 * (necessary in the NFSv4.0 compound case)
1013 */
1014 rqstp->rq_cachetype = proc->pc_cachetype;
1015
1016 svcxdr_init_decode(rqstp);
1015 if (!proc->pc_decode(rqstp, argv->iov_base))
1017 if (!proc->pc_decode(rqstp, &rqstp->rq_arg_stream))
1016 goto out_decode_err;
1017
1018 switch (nfsd_cache_lookup(rqstp)) {
1019 case RC_DOIT:
1020 break;
1021 case RC_REPLY:
1022 goto out_cached_reply;
1023 case RC_DROPIT:

--- 33 unchanged lines hidden (view full) ---

1057 nfsd_cache_update(rqstp, RC_NOCACHE, NULL);
1058 *statp = rpc_system_err;
1059 return 1;
1060}
1061
1062/**
1063 * nfssvc_decode_voidarg - Decode void arguments
1064 * @rqstp: Server RPC transaction context
1018 goto out_decode_err;
1019
1020 switch (nfsd_cache_lookup(rqstp)) {
1021 case RC_DOIT:
1022 break;
1023 case RC_REPLY:
1024 goto out_cached_reply;
1025 case RC_DROPIT:

--- 33 unchanged lines hidden (view full) ---

1059 nfsd_cache_update(rqstp, RC_NOCACHE, NULL);
1060 *statp = rpc_system_err;
1061 return 1;
1062}
1063
1064/**
1065 * nfssvc_decode_voidarg - Decode void arguments
1066 * @rqstp: Server RPC transaction context
1065 * @p: buffer containing arguments to decode
1067 * @xdr: XDR stream positioned at arguments to decode
1066 *
1067 * Return values:
1068 * %0: Arguments were not valid
1069 * %1: Decoding was successful
1070 */
1068 *
1069 * Return values:
1070 * %0: Arguments were not valid
1071 * %1: Decoding was successful
1072 */
1071int nfssvc_decode_voidarg(struct svc_rqst *rqstp, __be32 *p)
1073int nfssvc_decode_voidarg(struct svc_rqst *rqstp, struct xdr_stream *xdr)
1072{
1073 return 1;
1074}
1075
1076/**
1077 * nfssvc_encode_voidres - Encode void results
1078 * @rqstp: Server RPC transaction context
1079 * @p: buffer in which to encode results

--- 38 unchanged lines hidden ---
1074{
1075 return 1;
1076}
1077
1078/**
1079 * nfssvc_encode_voidres - Encode void results
1080 * @rqstp: Server RPC transaction context
1081 * @p: buffer in which to encode results

--- 38 unchanged lines hidden ---