diff options
Diffstat (limited to 'fs/nfs/mount_clnt.c')
-rw-r--r-- | fs/nfs/mount_clnt.c | 30 |
1 files changed, 13 insertions, 17 deletions
diff --git a/fs/nfs/mount_clnt.c b/fs/nfs/mount_clnt.c index 445abb4d4214..d507b021207f 100644 --- a/fs/nfs/mount_clnt.c +++ b/fs/nfs/mount_clnt.c | |||
@@ -14,7 +14,6 @@ | |||
14 | #include <linux/net.h> | 14 | #include <linux/net.h> |
15 | #include <linux/in.h> | 15 | #include <linux/in.h> |
16 | #include <linux/sunrpc/clnt.h> | 16 | #include <linux/sunrpc/clnt.h> |
17 | #include <linux/sunrpc/xprt.h> | ||
18 | #include <linux/sunrpc/sched.h> | 17 | #include <linux/sunrpc/sched.h> |
19 | #include <linux/nfs_fs.h> | 18 | #include <linux/nfs_fs.h> |
20 | 19 | ||
@@ -77,22 +76,19 @@ static struct rpc_clnt * | |||
77 | mnt_create(char *hostname, struct sockaddr_in *srvaddr, int version, | 76 | mnt_create(char *hostname, struct sockaddr_in *srvaddr, int version, |
78 | int protocol) | 77 | int protocol) |
79 | { | 78 | { |
80 | struct rpc_xprt *xprt; | 79 | struct rpc_create_args args = { |
81 | struct rpc_clnt *clnt; | 80 | .protocol = protocol, |
82 | 81 | .address = (struct sockaddr *)srvaddr, | |
83 | xprt = xprt_create_proto(protocol, srvaddr, NULL); | 82 | .addrsize = sizeof(*srvaddr), |
84 | if (IS_ERR(xprt)) | 83 | .servername = hostname, |
85 | return (struct rpc_clnt *)xprt; | 84 | .program = &mnt_program, |
86 | 85 | .version = version, | |
87 | clnt = rpc_create_client(xprt, hostname, | 86 | .authflavor = RPC_AUTH_UNIX, |
88 | &mnt_program, version, | 87 | .flags = (RPC_CLNT_CREATE_ONESHOT | |
89 | RPC_AUTH_UNIX); | 88 | RPC_CLNT_CREATE_INTR), |
90 | if (!IS_ERR(clnt)) { | 89 | }; |
91 | clnt->cl_softrtry = 1; | 90 | |
92 | clnt->cl_oneshot = 1; | 91 | return rpc_create(&args); |
93 | clnt->cl_intr = 1; | ||
94 | } | ||
95 | return clnt; | ||
96 | } | 92 | } |
97 | 93 | ||
98 | /* | 94 | /* |