skip op encoders in error cases
Get series with b4
b4 am [email protected]Versions newest first
- v1 Latest5 patches 1 replyIn review
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/5 | nfsd4: move some nfsd4 op definitions to xdr4.hfs/ fs/ | +44 | 0 replies | |
| 2/5 | opdesc will be useful outside nfs4proc.cfs/ fs/ fs/ | +14 | 0 replies | |
| 3/5 | nfsd4: define ->op_release for compound opsfs/ fs/ fs/ | +35 | 1 reply | |
| 4/5 | nfsd4: skip encoder in trivial error casesfs/ fs/ fs/ | +12 | 0 replies | |
| 5/5 | nfsd4: individual encoders no longer see error casesfs/ | +103 | 0 replies |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.
Cover letter [PATCH 0/5] skip op encoders in error cases
From: "J. Bruce Fields" <[email protected]>
This is just some cleanup:
f961e3f2acae "nfsd: encoders mustn't use unitialized values in error cases" fixed a couple cases like this:
const struct nfsd4_layout_ops *ops =
nfsd4_layout_ops[lgp->lg_layout_type];
__be32 *p;
dprintk("%s: err %d\n", __func__, nfserr);
if (nfserr)
goto out;which ignored the fact that lg_layout_type isn't even initialized in some error cases.
That seemed like an easy mistake to make, and made me wonder why we even obther calling the xdr encoders in the error case, since almost all of them are no-ops then.
So, these patches skip that. I think it's an improvement, but I'll listen to reason.
--b.
J. Bruce Fields (5):
nfsd4: move some nfsd4 op definitions to xdr4.h opdesc will be useful outside nfs4proc.c
nfsd4: define ->op_release for compound ops
nfsd4: skip encoder in trivial error cases
nfsd4: individual encoders no longer see error cases
fs/nfsd/nfs4proc.c | 109 ++++++++---------- fs/nfsd/nfs4xdr.c | 322 ++++++++++++++++++----------------------------------- fs/nfsd/xdr4.h | 49 ++++++++ 3 files changed, 208 insertions(+), 272 deletions(-)
Signature · 1 line
2.9.4