aboutsummaryrefslogtreecommitdiffstats
path: root/net/sunrpc
diff options
context:
space:
mode:
Diffstat (limited to 'net/sunrpc')
-rw-r--r--net/sunrpc/auth_generic.c4
-rw-r--r--net/sunrpc/auth_gss/gss_krb5_mech.c2
-rw-r--r--net/sunrpc/auth_gss/svcauth_gss.c7
-rw-r--r--net/sunrpc/auth_unix.c15
-rw-r--r--net/sunrpc/cache.c2
-rw-r--r--net/sunrpc/clnt.c4
-rw-r--r--net/sunrpc/rpc_pipe.c7
-rw-r--r--net/sunrpc/svc.c18
-rw-r--r--net/sunrpc/svc_xprt.c13
-rw-r--r--net/sunrpc/svcauth_unix.c18
-rw-r--r--net/sunrpc/svcsock.c30
-rw-r--r--net/sunrpc/timer.c6
-rw-r--r--net/sunrpc/xdr.c2
-rw-r--r--net/sunrpc/xprt.c2
14 files changed, 67 insertions, 63 deletions
diff --git a/net/sunrpc/auth_generic.c b/net/sunrpc/auth_generic.c
index 75762f346975..6ed6f201b022 100644
--- a/net/sunrpc/auth_generic.c
+++ b/net/sunrpc/auth_generic.c
@@ -160,8 +160,8 @@ generic_match(struct auth_cred *acred, struct rpc_cred *cred, int flags)
160 if (gcred->acred.group_info->ngroups != acred->group_info->ngroups) 160 if (gcred->acred.group_info->ngroups != acred->group_info->ngroups)
161 goto out_nomatch; 161 goto out_nomatch;
162 for (i = 0; i < gcred->acred.group_info->ngroups; i++) { 162 for (i = 0; i < gcred->acred.group_info->ngroups; i++) {
163 if (GROUP_AT(gcred->acred.group_info, i) != 163 if (!gid_eq(GROUP_AT(gcred->acred.group_info, i),
164 GROUP_AT(acred->group_info, i)) 164 GROUP_AT(acred->group_info, i)))
165 goto out_nomatch; 165 goto out_nomatch;
166 } 166 }
167out_match: 167out_match:
diff --git a/net/sunrpc/auth_gss/gss_krb5_mech.c b/net/sunrpc/auth_gss/gss_krb5_mech.c
index 8eff8c32d1b9..d3611f11a8df 100644
--- a/net/sunrpc/auth_gss/gss_krb5_mech.c
+++ b/net/sunrpc/auth_gss/gss_krb5_mech.c
@@ -624,7 +624,7 @@ gss_import_v2_context(const void *p, const void *end, struct krb5_ctx *ctx,
624 ctx->seq_send = ctx->seq_send64; 624 ctx->seq_send = ctx->seq_send64;
625 if (ctx->seq_send64 != ctx->seq_send) { 625 if (ctx->seq_send64 != ctx->seq_send) {
626 dprintk("%s: seq_send64 %lx, seq_send %x overflow?\n", __func__, 626 dprintk("%s: seq_send64 %lx, seq_send %x overflow?\n", __func__,
627 (long unsigned)ctx->seq_send64, ctx->seq_send); 627 (unsigned long)ctx->seq_send64, ctx->seq_send);
628 p = ERR_PTR(-EINVAL); 628 p = ERR_PTR(-EINVAL);
629 goto out_err; 629 goto out_err;
630 } 630 }
diff --git a/net/sunrpc/auth_gss/svcauth_gss.c b/net/sunrpc/auth_gss/svcauth_gss.c
index 1600cfb1618c..28b62dbb6d1e 100644
--- a/net/sunrpc/auth_gss/svcauth_gss.c
+++ b/net/sunrpc/auth_gss/svcauth_gss.c
@@ -41,6 +41,7 @@
41#include <linux/types.h> 41#include <linux/types.h>
42#include <linux/module.h> 42#include <linux/module.h>
43#include <linux/pagemap.h> 43#include <linux/pagemap.h>
44#include <linux/user_namespace.h>
44 45
45#include <linux/sunrpc/auth_gss.h> 46#include <linux/sunrpc/auth_gss.h>
46#include <linux/sunrpc/gss_err.h> 47#include <linux/sunrpc/gss_err.h>
@@ -470,9 +471,13 @@ static int rsc_parse(struct cache_detail *cd,
470 status = -EINVAL; 471 status = -EINVAL;
471 for (i=0; i<N; i++) { 472 for (i=0; i<N; i++) {
472 gid_t gid; 473 gid_t gid;
474 kgid_t kgid;
473 if (get_int(&mesg, &gid)) 475 if (get_int(&mesg, &gid))
474 goto out; 476 goto out;
475 GROUP_AT(rsci.cred.cr_group_info, i) = gid; 477 kgid = make_kgid(&init_user_ns, gid);
478 if (!gid_valid(kgid))
479 goto out;
480 GROUP_AT(rsci.cred.cr_group_info, i) = kgid;
476 } 481 }
477 482
478 /* mech name */ 483 /* mech name */
diff --git a/net/sunrpc/auth_unix.c b/net/sunrpc/auth_unix.c
index e50502d8ceb7..52c5abdee211 100644
--- a/net/sunrpc/auth_unix.c
+++ b/net/sunrpc/auth_unix.c
@@ -12,6 +12,7 @@
12#include <linux/module.h> 12#include <linux/module.h>
13#include <linux/sunrpc/clnt.h> 13#include <linux/sunrpc/clnt.h>
14#include <linux/sunrpc/auth.h> 14#include <linux/sunrpc/auth.h>
15#include <linux/user_namespace.h>
15 16
16#define NFS_NGROUPS 16 17#define NFS_NGROUPS 16
17 18
@@ -78,8 +79,11 @@ unx_create_cred(struct rpc_auth *auth, struct auth_cred *acred, int flags)
78 groups = NFS_NGROUPS; 79 groups = NFS_NGROUPS;
79 80
80 cred->uc_gid = acred->gid; 81 cred->uc_gid = acred->gid;
81 for (i = 0; i < groups; i++) 82 for (i = 0; i < groups; i++) {
82 cred->uc_gids[i] = GROUP_AT(acred->group_info, i); 83 gid_t gid;
84 gid = from_kgid(&init_user_ns, GROUP_AT(acred->group_info, i));
85 cred->uc_gids[i] = gid;
86 }
83 if (i < NFS_NGROUPS) 87 if (i < NFS_NGROUPS)
84 cred->uc_gids[i] = NOGROUP; 88 cred->uc_gids[i] = NOGROUP;
85 89
@@ -126,9 +130,12 @@ unx_match(struct auth_cred *acred, struct rpc_cred *rcred, int flags)
126 groups = acred->group_info->ngroups; 130 groups = acred->group_info->ngroups;
127 if (groups > NFS_NGROUPS) 131 if (groups > NFS_NGROUPS)
128 groups = NFS_NGROUPS; 132 groups = NFS_NGROUPS;
129 for (i = 0; i < groups ; i++) 133 for (i = 0; i < groups ; i++) {
130 if (cred->uc_gids[i] != GROUP_AT(acred->group_info, i)) 134 gid_t gid;
135 gid = from_kgid(&init_user_ns, GROUP_AT(acred->group_info, i));
136 if (cred->uc_gids[i] != gid)
131 return 0; 137 return 0;
138 }
132 if (groups < NFS_NGROUPS && 139 if (groups < NFS_NGROUPS &&
133 cred->uc_gids[groups] != NOGROUP) 140 cred->uc_gids[groups] != NOGROUP)
134 return 0; 141 return 0;
diff --git a/net/sunrpc/cache.c b/net/sunrpc/cache.c
index de0b0f39d9d8..47ad2666fdf6 100644
--- a/net/sunrpc/cache.c
+++ b/net/sunrpc/cache.c
@@ -1273,7 +1273,7 @@ static void *c_start(struct seq_file *m, loff_t *pos)
1273 __acquires(cd->hash_lock) 1273 __acquires(cd->hash_lock)
1274{ 1274{
1275 loff_t n = *pos; 1275 loff_t n = *pos;
1276 unsigned hash, entry; 1276 unsigned int hash, entry;
1277 struct cache_head *ch; 1277 struct cache_head *ch;
1278 struct cache_detail *cd = ((struct handle*)m->private)->cd; 1278 struct cache_detail *cd = ((struct handle*)m->private)->cd;
1279 1279
diff --git a/net/sunrpc/clnt.c b/net/sunrpc/clnt.c
index 25302c802460..f56f045778ae 100644
--- a/net/sunrpc/clnt.c
+++ b/net/sunrpc/clnt.c
@@ -127,9 +127,7 @@ static struct dentry *rpc_setup_pipedir_sb(struct super_block *sb,
127{ 127{
128 static uint32_t clntid; 128 static uint32_t clntid;
129 char name[15]; 129 char name[15];
130 struct qstr q = { 130 struct qstr q = { .name = name };
131 .name = name,
132 };
133 struct dentry *dir, *dentry; 131 struct dentry *dir, *dentry;
134 int error; 132 int error;
135 133
diff --git a/net/sunrpc/rpc_pipe.c b/net/sunrpc/rpc_pipe.c
index 88945d0f7594..04040476082e 100644
--- a/net/sunrpc/rpc_pipe.c
+++ b/net/sunrpc/rpc_pipe.c
@@ -1057,12 +1057,9 @@ static const struct rpc_filelist files[] = {
1057struct dentry *rpc_d_lookup_sb(const struct super_block *sb, 1057struct dentry *rpc_d_lookup_sb(const struct super_block *sb,
1058 const unsigned char *dir_name) 1058 const unsigned char *dir_name)
1059{ 1059{
1060 struct qstr dir = { 1060 struct qstr dir = QSTR_INIT(dir_name, strlen(dir_name));
1061 .name = dir_name,
1062 .len = strlen(dir_name),
1063 .hash = full_name_hash(dir_name, strlen(dir_name)),
1064 };
1065 1061
1062 dir.hash = full_name_hash(dir.name, dir.len);
1066 return d_lookup(sb->s_root, &dir); 1063 return d_lookup(sb->s_root, &dir);
1067} 1064}
1068EXPORT_SYMBOL_GPL(rpc_d_lookup_sb); 1065EXPORT_SYMBOL_GPL(rpc_d_lookup_sb);
diff --git a/net/sunrpc/svc.c b/net/sunrpc/svc.c
index 4153846984ac..017c0117d154 100644
--- a/net/sunrpc/svc.c
+++ b/net/sunrpc/svc.c
@@ -1041,23 +1041,21 @@ static void svc_unregister(const struct svc_serv *serv, struct net *net)
1041 * Printk the given error with the address of the client that caused it. 1041 * Printk the given error with the address of the client that caused it.
1042 */ 1042 */
1043static __printf(2, 3) 1043static __printf(2, 3)
1044int svc_printk(struct svc_rqst *rqstp, const char *fmt, ...) 1044void svc_printk(struct svc_rqst *rqstp, const char *fmt, ...)
1045{ 1045{
1046 struct va_format vaf;
1046 va_list args; 1047 va_list args;
1047 int r;
1048 char buf[RPC_MAX_ADDRBUFLEN]; 1048 char buf[RPC_MAX_ADDRBUFLEN];
1049 1049
1050 if (!net_ratelimit()) 1050 va_start(args, fmt);
1051 return 0;
1052 1051
1053 printk(KERN_WARNING "svc: %s: ", 1052 vaf.fmt = fmt;
1054 svc_print_addr(rqstp, buf, sizeof(buf))); 1053 vaf.va = &args;
1055 1054
1056 va_start(args, fmt); 1055 net_warn_ratelimited("svc: %s: %pV",
1057 r = vprintk(fmt, args); 1056 svc_print_addr(rqstp, buf, sizeof(buf)), &vaf);
1058 va_end(args);
1059 1057
1060 return r; 1058 va_end(args);
1061} 1059}
1062 1060
1063/* 1061/*
diff --git a/net/sunrpc/svc_xprt.c b/net/sunrpc/svc_xprt.c
index 4bda09d7e1a4..b98ee3514912 100644
--- a/net/sunrpc/svc_xprt.c
+++ b/net/sunrpc/svc_xprt.c
@@ -544,14 +544,11 @@ static void svc_check_conn_limits(struct svc_serv *serv)
544 struct svc_xprt *xprt = NULL; 544 struct svc_xprt *xprt = NULL;
545 spin_lock_bh(&serv->sv_lock); 545 spin_lock_bh(&serv->sv_lock);
546 if (!list_empty(&serv->sv_tempsocks)) { 546 if (!list_empty(&serv->sv_tempsocks)) {
547 if (net_ratelimit()) { 547 /* Try to help the admin */
548 /* Try to help the admin */ 548 net_notice_ratelimited("%s: too many open connections, consider increasing the %s\n",
549 printk(KERN_NOTICE "%s: too many open " 549 serv->sv_name, serv->sv_maxconn ?
550 "connections, consider increasing %s\n", 550 "max number of connections" :
551 serv->sv_name, serv->sv_maxconn ? 551 "number of threads");
552 "the max number of connections." :
553 "the number of threads.");
554 }
555 /* 552 /*
556 * Always select the oldest connection. It's not fair, 553 * Always select the oldest connection. It's not fair,
557 * but so is life 554 * but so is life
diff --git a/net/sunrpc/svcauth_unix.c b/net/sunrpc/svcauth_unix.c
index 521d8f7dc833..71ec8530ec8c 100644
--- a/net/sunrpc/svcauth_unix.c
+++ b/net/sunrpc/svcauth_unix.c
@@ -14,6 +14,7 @@
14#include <net/sock.h> 14#include <net/sock.h>
15#include <net/ipv6.h> 15#include <net/ipv6.h>
16#include <linux/kernel.h> 16#include <linux/kernel.h>
17#include <linux/user_namespace.h>
17#define RPCDBG_FACILITY RPCDBG_AUTH 18#define RPCDBG_FACILITY RPCDBG_AUTH
18 19
19#include <linux/sunrpc/clnt.h> 20#include <linux/sunrpc/clnt.h>
@@ -530,11 +531,15 @@ static int unix_gid_parse(struct cache_detail *cd,
530 531
531 for (i = 0 ; i < gids ; i++) { 532 for (i = 0 ; i < gids ; i++) {
532 int gid; 533 int gid;
534 kgid_t kgid;
533 rv = get_int(&mesg, &gid); 535 rv = get_int(&mesg, &gid);
534 err = -EINVAL; 536 err = -EINVAL;
535 if (rv) 537 if (rv)
536 goto out; 538 goto out;
537 GROUP_AT(ug.gi, i) = gid; 539 kgid = make_kgid(&init_user_ns, gid);
540 if (!gid_valid(kgid))
541 goto out;
542 GROUP_AT(ug.gi, i) = kgid;
538 } 543 }
539 544
540 ugp = unix_gid_lookup(cd, uid); 545 ugp = unix_gid_lookup(cd, uid);
@@ -563,6 +568,7 @@ static int unix_gid_show(struct seq_file *m,
563 struct cache_detail *cd, 568 struct cache_detail *cd,
564 struct cache_head *h) 569 struct cache_head *h)
565{ 570{
571 struct user_namespace *user_ns = current_user_ns();
566 struct unix_gid *ug; 572 struct unix_gid *ug;
567 int i; 573 int i;
568 int glen; 574 int glen;
@@ -580,7 +586,7 @@ static int unix_gid_show(struct seq_file *m,
580 586
581 seq_printf(m, "%u %d:", ug->uid, glen); 587 seq_printf(m, "%u %d:", ug->uid, glen);
582 for (i = 0; i < glen; i++) 588 for (i = 0; i < glen; i++)
583 seq_printf(m, " %d", GROUP_AT(ug->gi, i)); 589 seq_printf(m, " %d", from_kgid_munged(user_ns, GROUP_AT(ug->gi, i)));
584 seq_printf(m, "\n"); 590 seq_printf(m, "\n");
585 return 0; 591 return 0;
586} 592}
@@ -831,8 +837,12 @@ svcauth_unix_accept(struct svc_rqst *rqstp, __be32 *authp)
831 cred->cr_group_info = groups_alloc(slen); 837 cred->cr_group_info = groups_alloc(slen);
832 if (cred->cr_group_info == NULL) 838 if (cred->cr_group_info == NULL)
833 return SVC_CLOSE; 839 return SVC_CLOSE;
834 for (i = 0; i < slen; i++) 840 for (i = 0; i < slen; i++) {
835 GROUP_AT(cred->cr_group_info, i) = svc_getnl(argv); 841 kgid_t kgid = make_kgid(&init_user_ns, svc_getnl(argv));
842 if (!gid_valid(kgid))
843 goto badcred;
844 GROUP_AT(cred->cr_group_info, i) = kgid;
845 }
836 if (svc_getu32(argv) != htonl(RPC_AUTH_NULL) || svc_getu32(argv) != 0) { 846 if (svc_getu32(argv) != htonl(RPC_AUTH_NULL) || svc_getu32(argv) != 0) {
837 *authp = rpc_autherr_badverf; 847 *authp = rpc_autherr_badverf;
838 return SVC_DENIED; 848 return SVC_DENIED;
diff --git a/net/sunrpc/svcsock.c b/net/sunrpc/svcsock.c
index 824d32fb3121..a6de09de5d21 100644
--- a/net/sunrpc/svcsock.c
+++ b/net/sunrpc/svcsock.c
@@ -617,11 +617,8 @@ static int svc_udp_recvfrom(struct svc_rqst *rqstp)
617 rqstp->rq_prot = IPPROTO_UDP; 617 rqstp->rq_prot = IPPROTO_UDP;
618 618
619 if (!svc_udp_get_dest_address(rqstp, cmh)) { 619 if (!svc_udp_get_dest_address(rqstp, cmh)) {
620 if (net_ratelimit()) 620 net_warn_ratelimited("svc: received unknown control message %d/%d; dropping RPC reply datagram\n",
621 printk(KERN_WARNING 621 cmh->cmsg_level, cmh->cmsg_type);
622 "svc: received unknown control message %d/%d; "
623 "dropping RPC reply datagram\n",
624 cmh->cmsg_level, cmh->cmsg_type);
625 skb_free_datagram_locked(svsk->sk_sk, skb); 622 skb_free_datagram_locked(svsk->sk_sk, skb);
626 return 0; 623 return 0;
627 } 624 }
@@ -871,18 +868,17 @@ static struct svc_xprt *svc_tcp_accept(struct svc_xprt *xprt)
871 if (err == -ENOMEM) 868 if (err == -ENOMEM)
872 printk(KERN_WARNING "%s: no more sockets!\n", 869 printk(KERN_WARNING "%s: no more sockets!\n",
873 serv->sv_name); 870 serv->sv_name);
874 else if (err != -EAGAIN && net_ratelimit()) 871 else if (err != -EAGAIN)
875 printk(KERN_WARNING "%s: accept failed (err %d)!\n", 872 net_warn_ratelimited("%s: accept failed (err %d)!\n",
876 serv->sv_name, -err); 873 serv->sv_name, -err);
877 return NULL; 874 return NULL;
878 } 875 }
879 set_bit(XPT_CONN, &svsk->sk_xprt.xpt_flags); 876 set_bit(XPT_CONN, &svsk->sk_xprt.xpt_flags);
880 877
881 err = kernel_getpeername(newsock, sin, &slen); 878 err = kernel_getpeername(newsock, sin, &slen);
882 if (err < 0) { 879 if (err < 0) {
883 if (net_ratelimit()) 880 net_warn_ratelimited("%s: peername failed (err %d)!\n",
884 printk(KERN_WARNING "%s: peername failed (err %d)!\n", 881 serv->sv_name, -err);
885 serv->sv_name, -err);
886 goto failed; /* aborted connection or whatever */ 882 goto failed; /* aborted connection or whatever */
887 } 883 }
888 884
@@ -1012,19 +1008,15 @@ static int svc_tcp_recv_record(struct svc_sock *svsk, struct svc_rqst *rqstp)
1012 * bit set in the fragment length header. 1008 * bit set in the fragment length header.
1013 * But apparently no known nfs clients send fragmented 1009 * But apparently no known nfs clients send fragmented
1014 * records. */ 1010 * records. */
1015 if (net_ratelimit()) 1011 net_notice_ratelimited("RPC: multiple fragments per record not supported\n");
1016 printk(KERN_NOTICE "RPC: multiple fragments "
1017 "per record not supported\n");
1018 goto err_delete; 1012 goto err_delete;
1019 } 1013 }
1020 1014
1021 svsk->sk_reclen &= RPC_FRAGMENT_SIZE_MASK; 1015 svsk->sk_reclen &= RPC_FRAGMENT_SIZE_MASK;
1022 dprintk("svc: TCP record, %d bytes\n", svsk->sk_reclen); 1016 dprintk("svc: TCP record, %d bytes\n", svsk->sk_reclen);
1023 if (svsk->sk_reclen > serv->sv_max_mesg) { 1017 if (svsk->sk_reclen > serv->sv_max_mesg) {
1024 if (net_ratelimit()) 1018 net_notice_ratelimited("RPC: fragment too large: 0x%08lx\n",
1025 printk(KERN_NOTICE "RPC: " 1019 (unsigned long)svsk->sk_reclen);
1026 "fragment too large: 0x%08lx\n",
1027 (unsigned long)svsk->sk_reclen);
1028 goto err_delete; 1020 goto err_delete;
1029 } 1021 }
1030 } 1022 }
@@ -1556,7 +1548,7 @@ static struct svc_xprt *svc_create_socket(struct svc_serv *serv,
1556 (char *)&val, sizeof(val)); 1548 (char *)&val, sizeof(val));
1557 1549
1558 if (type == SOCK_STREAM) 1550 if (type == SOCK_STREAM)
1559 sock->sk->sk_reuse = 1; /* allow address reuse */ 1551 sock->sk->sk_reuse = SK_CAN_REUSE; /* allow address reuse */
1560 error = kernel_bind(sock, sin, len); 1552 error = kernel_bind(sock, sin, len);
1561 if (error < 0) 1553 if (error < 0)
1562 goto bummer; 1554 goto bummer;
diff --git a/net/sunrpc/timer.c b/net/sunrpc/timer.c
index dd824341c349..08881d0c9672 100644
--- a/net/sunrpc/timer.c
+++ b/net/sunrpc/timer.c
@@ -34,7 +34,7 @@
34void rpc_init_rtt(struct rpc_rtt *rt, unsigned long timeo) 34void rpc_init_rtt(struct rpc_rtt *rt, unsigned long timeo)
35{ 35{
36 unsigned long init = 0; 36 unsigned long init = 0;
37 unsigned i; 37 unsigned int i;
38 38
39 rt->timeo = timeo; 39 rt->timeo = timeo;
40 40
@@ -57,7 +57,7 @@ EXPORT_SYMBOL_GPL(rpc_init_rtt);
57 * NB: When computing the smoothed RTT and standard deviation, 57 * NB: When computing the smoothed RTT and standard deviation,
58 * be careful not to produce negative intermediate results. 58 * be careful not to produce negative intermediate results.
59 */ 59 */
60void rpc_update_rtt(struct rpc_rtt *rt, unsigned timer, long m) 60void rpc_update_rtt(struct rpc_rtt *rt, unsigned int timer, long m)
61{ 61{
62 long *srtt, *sdrtt; 62 long *srtt, *sdrtt;
63 63
@@ -106,7 +106,7 @@ EXPORT_SYMBOL_GPL(rpc_update_rtt);
106 * read, write, commit - A+4D 106 * read, write, commit - A+4D
107 * other - timeo 107 * other - timeo
108 */ 108 */
109unsigned long rpc_calc_rto(struct rpc_rtt *rt, unsigned timer) 109unsigned long rpc_calc_rto(struct rpc_rtt *rt, unsigned int timer)
110{ 110{
111 unsigned long res; 111 unsigned long res;
112 112
diff --git a/net/sunrpc/xdr.c b/net/sunrpc/xdr.c
index b97a3dd9a60a..fddcccfcdf76 100644
--- a/net/sunrpc/xdr.c
+++ b/net/sunrpc/xdr.c
@@ -1204,7 +1204,7 @@ xdr_process_buf(struct xdr_buf *buf, unsigned int offset, unsigned int len,
1204 int (*actor)(struct scatterlist *, void *), void *data) 1204 int (*actor)(struct scatterlist *, void *), void *data)
1205{ 1205{
1206 int i, ret = 0; 1206 int i, ret = 0;
1207 unsigned page_len, thislen, page_offset; 1207 unsigned int page_len, thislen, page_offset;
1208 struct scatterlist sg[1]; 1208 struct scatterlist sg[1];
1209 1209
1210 sg_init_table(sg, 1); 1210 sg_init_table(sg, 1);
diff --git a/net/sunrpc/xprt.c b/net/sunrpc/xprt.c
index d7ccd7923eab..3c83035cdaa9 100644
--- a/net/sunrpc/xprt.c
+++ b/net/sunrpc/xprt.c
@@ -783,7 +783,7 @@ static void xprt_update_rtt(struct rpc_task *task)
783{ 783{
784 struct rpc_rqst *req = task->tk_rqstp; 784 struct rpc_rqst *req = task->tk_rqstp;
785 struct rpc_rtt *rtt = task->tk_client->cl_rtt; 785 struct rpc_rtt *rtt = task->tk_client->cl_rtt;
786 unsigned timer = task->tk_msg.rpc_proc->p_timer; 786 unsigned int timer = task->tk_msg.rpc_proc->p_timer;
787 long m = usecs_to_jiffies(ktime_to_us(req->rq_rtt)); 787 long m = usecs_to_jiffies(ktime_to_us(req->rq_rtt));
788 788
789 if (timer) { 789 if (timer) {