if (unlikely(p == NULL))
                return htonl(NFS4ERR_RESOURCE);
        hdr->minorversion = ntohl(*p++);
-       /* Check minor version is zero or one or two. */
-       if (hdr->minorversion <= 2) {
+       /* Check for minor version support */
+       if (hdr->minorversion <= NFS4_MAX_MINOR_VERSION) {
                hdr->cb_ident = ntohl(*p++); /* ignored by v4.1 and v4.2 */
        } else {
                pr_warn_ratelimited("NFS: %s: NFSv4 server callback with "
        return htonl(NFS_OK);
 }
 
-static __be32 process_op(uint32_t minorversion, int nop,
-               struct svc_rqst *rqstp,
+static __be32 process_op(int nop, struct svc_rqst *rqstp,
                struct xdr_stream *xdr_in, void *argp,
                struct xdr_stream *xdr_out, void *resp,
                struct cb_process_state *cps)
                return status;
 
        dprintk("%s: minorversion=%d nop=%d op_nr=%u\n",
-               __func__, minorversion, nop, op_nr);
+               __func__, cps->minorversion, nop, op_nr);
 
-       status = minorversion ? preprocess_nfs41_op(nop, op_nr, &op) :
+       status = cps->minorversion ? preprocess_nfs41_op(nop, op_nr, &op) :
                                preprocess_nfs4_op(op_nr, &op);
        if (status == htonl(NFS4ERR_OP_ILLEGAL))
                op_nr = OP_CB_ILLEGAL;
                        return rpc_drop_reply;
        }
 
+       cps.minorversion = hdr_arg.minorversion;
        hdr_res.taglen = hdr_arg.taglen;
        hdr_res.tag = hdr_arg.tag;
        if (encode_compound_hdr_res(&xdr_out, &hdr_res) != 0)
                return rpc_system_err;
 
        while (status == 0 && nops != hdr_arg.nops) {
-               status = process_op(hdr_arg.minorversion, nops, rqstp,
-                                   &xdr_in, argp, &xdr_out, resp, &cps);
+               status = process_op(nops, rqstp, &xdr_in,
+                                   argp, &xdr_out, resp, &cps);
                nops++;
        }
 
 
 extern struct nfs_client *nfs4_find_client_ident(struct net *, int);
 extern struct nfs_client *
 nfs4_find_client_sessionid(struct net *, const struct sockaddr *,
-                               struct nfs4_sessionid *);
+                               struct nfs4_sessionid *, u32);
 extern struct nfs_server *nfs_create_server(struct nfs_mount_info *,
                                        struct nfs_subversion *);
 extern struct nfs_server *nfs4_create_server(
 
  */
 struct nfs_client *
 nfs4_find_client_sessionid(struct net *net, const struct sockaddr *addr,
-                          struct nfs4_sessionid *sid)
+                          struct nfs4_sessionid *sid, u32 minorversion)
 {
        struct nfs_client *clp;
        struct nfs_net *nn = net_generic(net, nfs_net_id);
 
        spin_lock(&nn->nfs_client_lock);
        list_for_each_entry(clp, &nn->nfs_client_list, cl_share_link) {
-               if (nfs4_cb_match_client(addr, clp, 1) == false)
+               if (nfs4_cb_match_client(addr, clp, minorversion) == false)
                        continue;
 
                if (!nfs4_has_session(clp))
 
 struct nfs_client *
 nfs4_find_client_sessionid(struct net *net, const struct sockaddr *addr,
-                          struct nfs4_sessionid *sid)
+                          struct nfs4_sessionid *sid, u32 minorversion)
 {
        return NULL;
 }