~ubuntu-branches/ubuntu/quantal/linux-linaro-mx51/quantal

« back to all changes in this revision

Viewing changes to net/sunrpc/clnt.c

  • Committer: Package Import Robot
  • Author(s): John Rigby, John Rigby
  • Date: 2011-09-26 10:44:23 UTC
  • Revision ID: package-import@ubuntu.com-20110926104423-3o58a3c1bj7x00rs
Tags: 3.0.0-1007.9
[ John Rigby ]

Enable crypto modules and remove crypto-modules from
exclude-module files
LP: #826021

Show diffs side-by-side

added added

removed removed

Lines of Context:
13
13
 *      and need to be refreshed, or when a packet was damaged in transit.
14
14
 *      This may be have to be moved to the VFS layer.
15
15
 *
16
 
 *  NB: BSD uses a more intelligent approach to guessing when a request
17
 
 *  or reply has been lost by keeping the RTO estimate for each procedure.
18
 
 *  We currently make do with a constant timeout value.
19
 
 *
20
16
 *  Copyright (C) 1992,1993 Rick Sladkey <jrs@world.std.com>
21
17
 *  Copyright (C) 1995,1996 Olaf Kirch <okir@monad.swb.de>
22
18
 */
32
28
#include <linux/slab.h>
33
29
#include <linux/utsname.h>
34
30
#include <linux/workqueue.h>
 
31
#include <linux/in.h>
35
32
#include <linux/in6.h>
 
33
#include <linux/un.h>
36
34
 
37
35
#include <linux/sunrpc/clnt.h>
38
36
#include <linux/sunrpc/rpc_pipe_fs.h>
298
296
         * up a string representation of the passed-in address.
299
297
         */
300
298
        if (args->servername == NULL) {
 
299
                struct sockaddr_un *sun =
 
300
                                (struct sockaddr_un *)args->address;
 
301
                struct sockaddr_in *sin =
 
302
                                (struct sockaddr_in *)args->address;
 
303
                struct sockaddr_in6 *sin6 =
 
304
                                (struct sockaddr_in6 *)args->address;
 
305
 
301
306
                servername[0] = '\0';
302
307
                switch (args->address->sa_family) {
303
 
                case AF_INET: {
304
 
                        struct sockaddr_in *sin =
305
 
                                        (struct sockaddr_in *)args->address;
 
308
                case AF_LOCAL:
 
309
                        snprintf(servername, sizeof(servername), "%s",
 
310
                                 sun->sun_path);
 
311
                        break;
 
312
                case AF_INET:
306
313
                        snprintf(servername, sizeof(servername), "%pI4",
307
314
                                 &sin->sin_addr.s_addr);
308
315
                        break;
309
 
                }
310
 
                case AF_INET6: {
311
 
                        struct sockaddr_in6 *sin =
312
 
                                        (struct sockaddr_in6 *)args->address;
 
316
                case AF_INET6:
313
317
                        snprintf(servername, sizeof(servername), "%pI6",
314
 
                                 &sin->sin6_addr);
 
318
                                 &sin6->sin6_addr);
315
319
                        break;
316
 
                }
317
320
                default:
318
321
                        /* caller wants default server name, but
319
322
                         * address family isn't recognized. */
1058
1061
 
1059
1062
        dprintk("RPC: %5u rpc_buffer allocation failed\n", task->tk_pid);
1060
1063
 
1061
 
        if (RPC_IS_ASYNC(task) || !signalled()) {
 
1064
        if (RPC_IS_ASYNC(task) || !fatal_signal_pending(current)) {
1062
1065
                task->tk_action = call_allocate;
1063
1066
                rpc_delay(task, HZ>>4);
1064
1067
                return;
1172
1175
                        status = -EOPNOTSUPP;
1173
1176
                        break;
1174
1177
                }
 
1178
                if (task->tk_rebind_retry == 0)
 
1179
                        break;
 
1180
                task->tk_rebind_retry--;
1175
1181
                rpc_delay(task, 3*HZ);
1176
1182
                goto retry_timeout;
1177
1183
        case -ETIMEDOUT: