NFSD: Use const pointers as parameters to fh_ helpers
[ Upstream commit b48f8056c034f28dd54668399f1d22be421b0bef ] Enable callers to use const pointers where they are able to. Signed-off-by: Chuck Lever <chuck.lever@oracle.com> Tested-by: Jeff Layton <jlayton@kernel.org> Reviewed-by: Jeff Layton <jlayton@kernel.org> Reviewed-by: NeilBrown <neilb@suse.de> Signed-off-by: Chuck Lever <chuck.lever@oracle.com> Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
parent
a311157fbd
commit
8e8cbb20aa
1 changed files with 6 additions and 4 deletions
|
@ -174,7 +174,7 @@ __be32 fh_update(struct svc_fh *);
|
|||
void fh_put(struct svc_fh *);
|
||||
|
||||
static __inline__ struct svc_fh *
|
||||
fh_copy(struct svc_fh *dst, struct svc_fh *src)
|
||||
fh_copy(struct svc_fh *dst, const struct svc_fh *src)
|
||||
{
|
||||
WARN_ON(src->fh_dentry || src->fh_locked);
|
||||
|
||||
|
@ -183,7 +183,7 @@ fh_copy(struct svc_fh *dst, struct svc_fh *src)
|
|||
}
|
||||
|
||||
static inline void
|
||||
fh_copy_shallow(struct knfsd_fh *dst, struct knfsd_fh *src)
|
||||
fh_copy_shallow(struct knfsd_fh *dst, const struct knfsd_fh *src)
|
||||
{
|
||||
dst->fh_size = src->fh_size;
|
||||
memcpy(&dst->fh_base, &src->fh_base, src->fh_size);
|
||||
|
@ -197,7 +197,8 @@ fh_init(struct svc_fh *fhp, int maxsize)
|
|||
return fhp;
|
||||
}
|
||||
|
||||
static inline bool fh_match(struct knfsd_fh *fh1, struct knfsd_fh *fh2)
|
||||
static inline bool fh_match(const struct knfsd_fh *fh1,
|
||||
const struct knfsd_fh *fh2)
|
||||
{
|
||||
if (fh1->fh_size != fh2->fh_size)
|
||||
return false;
|
||||
|
@ -206,7 +207,8 @@ static inline bool fh_match(struct knfsd_fh *fh1, struct knfsd_fh *fh2)
|
|||
return true;
|
||||
}
|
||||
|
||||
static inline bool fh_fsid_match(struct knfsd_fh *fh1, struct knfsd_fh *fh2)
|
||||
static inline bool fh_fsid_match(const struct knfsd_fh *fh1,
|
||||
const struct knfsd_fh *fh2)
|
||||
{
|
||||
if (fh1->fh_fsid_type != fh2->fh_fsid_type)
|
||||
return false;
|
||||
|
|
Loading…
Add table
Reference in a new issue