Merge tag 'nfsd-5.6' of git://linux-nfs.org/~bfields/linux
[platform/kernel/linux-starfive.git] / net / sunrpc / auth_gss / svcauth_gss.c
index 3111817..65b67b2 100644 (file)
@@ -1248,6 +1248,7 @@ static int gss_proxy_save_rsc(struct cache_detail *cd,
                dprintk("RPC:       No creds found!\n");
                goto out;
        } else {
+               struct timespec64 boot;
 
                /* steal creds */
                rsci.cred = ud->creds;
@@ -1268,6 +1269,9 @@ static int gss_proxy_save_rsc(struct cache_detail *cd,
                                                &expiry, GFP_KERNEL);
                if (status)
                        goto out;
+
+               getboottime64(&boot);
+               expiry -= boot.tv_sec;
        }
 
        rsci.h.expiry_time = expiry;
@@ -1428,10 +1432,10 @@ static ssize_t read_gssp(struct file *file, char __user *buf,
        return len;
 }
 
-static const struct file_operations use_gss_proxy_ops = {
-       .open = nonseekable_open,
-       .write = write_gssp,
-       .read = read_gssp,
+static const struct proc_ops use_gss_proxy_proc_ops = {
+       .proc_open      = nonseekable_open,
+       .proc_write     = write_gssp,
+       .proc_read      = read_gssp,
 };
 
 static int create_use_gss_proxy_proc_entry(struct net *net)
@@ -1442,7 +1446,7 @@ static int create_use_gss_proxy_proc_entry(struct net *net)
        sn->use_gss_proxy = -1;
        *p = proc_create_data("use-gss-proxy", S_IFREG | 0600,
                              sn->proc_net_rpc,
-                             &use_gss_proxy_ops, net);
+                             &use_gss_proxy_proc_ops, net);
        if (!*p)
                return -ENOMEM;
        init_gssp_clnt(sn);