@@ -454,7 +454,9 @@ static bool fsid_type_ok_for_exp(u8 fsid_type, struct svc_export *exp)
}
-static void set_version_and_fsid_type(struct svc_fh *fhp, struct svc_export *exp, struct svc_fh *ref_fh)
+static void
+set_version_and_fsid_type(struct knfsd_fh *kfh, int maxsize,
+ struct svc_export *exp, struct svc_fh *ref_fh)
{
u8 version;
u8 fsid_type;
@@ -487,7 +489,7 @@ retry:
} else if (exp->ex_flags & NFSEXP_FSID) {
fsid_type = FSID_NUM;
} else if (exp->ex_uuid) {
- if (fhp->fh_maxsize >= 64) {
+ if (maxsize >= 64) {
if (is_root_export(exp))
fsid_type = FSID_UUID16;
else
@@ -503,9 +505,9 @@ retry:
fsid_type = FSID_ENCODE_DEV;
else
fsid_type = FSID_DEV;
- fhp->fh_handle.fh_version = version;
+ kfh->fh_version = version;
if (version)
- fhp->fh_handle.fh_fsid_type = fsid_type;
+ kfh->fh_fsid_type = fsid_type;
}
__be32
@@ -533,7 +535,8 @@ fh_compose(struct svc_fh *fhp, struct svc_export *exp, struct dentry *dentry,
* the reference filehandle (if it is in the same export)
* or the export options.
*/
- set_version_and_fsid_type(fhp, exp, ref_fh);
+ set_version_and_fsid_type(&fhp->fh_handle, fhp->fh_maxsize,
+ exp, ref_fh);
if (ref_fh == fhp)
fh_put(ref_fh);
Note however that we do still have it take a svc_fh for the ref_fh, but that could be changed in the future if it's helpful to do so. Signed-off-by: Jeff Layton <jeff.layton@primarydata.com> --- fs/nfsd/nfsfh.c | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-)