summaryrefslogtreecommitdiff
path: root/fs/nfsd/xdr4.h
diff options
context:
space:
mode:
authorJ. Bruce Fields <bfields@redhat.com>2017-05-06 10:49:21 -0400
committerJ. Bruce Fields <bfields@redhat.com>2017-08-24 22:12:48 -0400
commitb7571e4cd39ae860379138b883bc5f57a8553184 (patch)
tree331f475565a52362b1b1d83d89edd305f723fcf2 /fs/nfsd/xdr4.h
parent34b1744c91ccd44811005822106945fa80ecbff2 (diff)
nfsd4: skip encoder in trivial error cases
Most encoders do nothing in the error case. But they can still screw things up in that case: most errors happen very early in rpc processing, possibly before argument fields are filled in and bounds-tested, so encoders that do anything other than immediately bail on error can easily crash in odd error cases. So just handle errors centrally most of the time to remove the chance of error. Signed-off-by: J. Bruce Fields <bfields@redhat.com>
Diffstat (limited to 'fs/nfsd/xdr4.h')
-rw-r--r--fs/nfsd/xdr4.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/fs/nfsd/xdr4.h b/fs/nfsd/xdr4.h
index 1e6274e0e066..f8a0b6549a88 100644
--- a/fs/nfsd/xdr4.h
+++ b/fs/nfsd/xdr4.h
@@ -778,6 +778,8 @@ enum nfsd4_op_flags {
* These are ops which clear current state id.
*/
OP_CLEAR_STATEID = 1 << 7,
+ /* Most ops return only an error on failure; some may do more: */
+ OP_NONTRIVIAL_ERROR_ENCODE = 1 << 8,
};
struct nfsd4_operation {