[PATCH] knfsd: nfsd4: fix owner-override on open
[firefly-linux-kernel-4.4.55.git] / fs / lockd / svc4proc.c
index 97bd36c09a5b6daba7dde9cb475c0381e8c40979..fa370f6eb07b27ddf2b1dc2b984ed5633b3d7c82 100644 (file)
@@ -38,7 +38,7 @@ nlm4svc_retrieve_args(struct svc_rqst *rqstp, struct nlm_args *argp,
                return nlm_lck_denied_nolocks;
 
        /* Obtain host handle */
-       if (!(host = nlmsvc_lookup_host(rqstp))
+       if (!(host = nlmsvc_lookup_host(rqstp, lock->caller, lock->len))
         || (argp->monitor && nsm_monitor(host) < 0))
                goto no_locks;
        *hostp = host;
@@ -260,7 +260,9 @@ static int nlm4svc_callback(struct svc_rqst *rqstp, u32 proc, struct nlm_args *a
        struct nlm_rqst *call;
        int stat;
 
-       host = nlmsvc_lookup_host(rqstp);
+       host = nlmsvc_lookup_host(rqstp,
+                                 argp->lock.caller,
+                                 argp->lock.len);
        if (host == NULL)
                return rpc_system_err;
 
@@ -436,7 +438,7 @@ nlm4svc_proc_sm_notify(struct svc_rqst *rqstp, struct nlm_reboot *argp,
         */
        memset(&saddr, 0, sizeof(saddr));
        saddr.sin_addr.s_addr = argp->addr;
-       nlm_host_rebooted(&saddr, argp);
+       nlm_host_rebooted(&saddr, argp->mon, argp->len, argp->state);
 
        return rpc_success;
 }
@@ -453,7 +455,7 @@ nlm4svc_proc_granted_res(struct svc_rqst *rqstp, struct nlm_res  *argp,
 
         dprintk("lockd: GRANTED_RES   called\n");
 
-        nlmsvc_grant_reply(rqstp, &argp->cookie, argp->status);
+        nlmsvc_grant_reply(&argp->cookie, argp->status);
         return rpc_success;
 }