mbox series

[0/6] nfsd: assorted clean-ups

Message ID 20240726022538.32076-1-neilb@suse.de (mailing list archive)
Headers show
Series nfsd: assorted clean-ups | expand

Message

NeilBrown July 26, 2024, 2:21 a.m. UTC
My recent series (that may not now be needed) to allow fh_verify() to
not be given an rqstp pointer (instead taking the individual fields that
it actually needs) exposed several opportunities for improving code
cleanliness.  This series provides just those.

I'm not convinced that the last 2 are a genuine improvement, but that
follow a pattern set by earlier patches, and maybe they are a good idea.

There is some minor behavioural change in that some error codes are
changed as described in patch 3.

Thanks,
NeilBrown

 [PATCH 1/6] nfsd: Don't pass all of rqst into rqst_exp_find()
 [PATCH 2/6] nfsd: Pass 'cred' instead of 'rqstp' to some functions.
 [PATCH 3/6] nfsd: Move error code mapping to per-version xdr code.
 [PATCH 4/6] nfsd: use nfsd_v4client() in nfsd_breaker_owns_lease()
 [PATCH 5/6] nfsd: further centralize protocol version checks.
 [PATCH 6/6] nfsd: move V4ROOT version check to nfsd_set_fh_dentry()

Comments

Jeff Layton July 26, 2024, 12:50 p.m. UTC | #1
On Fri, 2024-07-26 at 12:21 +1000, NeilBrown wrote:
> My recent series (that may not now be needed) to allow fh_verify() to
> not be given an rqstp pointer (instead taking the individual fields that
> it actually needs) exposed several opportunities for improving code
> cleanliness.  This series provides just those.
> 
> I'm not convinced that the last 2 are a genuine improvement, but that
> follow a pattern set by earlier patches, and maybe they are a good idea.
> 
> There is some minor behavioural change in that some error codes are
> changed as described in patch 3.
> 
> Thanks,
> NeilBrown
> 
>  [PATCH 1/6] nfsd: Don't pass all of rqst into rqst_exp_find()
>  [PATCH 2/6] nfsd: Pass 'cred' instead of 'rqstp' to some functions.
>  [PATCH 3/6] nfsd: Move error code mapping to per-version xdr code.
>  [PATCH 4/6] nfsd: use nfsd_v4client() in nfsd_breaker_owns_lease()
>  [PATCH 5/6] nfsd: further centralize protocol version checks.
>  [PATCH 6/6] nfsd: move V4ROOT version check to nfsd_set_fh_dentry()


This all looks reasonable to me. The last two do seem more marginal
than the first four, but I think they make the code more readable, on
balance.

Reviewed-by: Jeff Layton <jlayton@kernel.org>