aboutsummaryrefslogtreecommitdiffstats
path: root/net/sunrpc/addr.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/sunrpc/addr.c')
-rw-r--r--net/sunrpc/addr.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/net/sunrpc/addr.c b/net/sunrpc/addr.c
index 4195233c4914..23cd19d45ab3 100644
--- a/net/sunrpc/addr.c
+++ b/net/sunrpc/addr.c
@@ -255,12 +255,13 @@ EXPORT_SYMBOL_GPL(rpc_pton);
255/** 255/**
256 * rpc_sockaddr2uaddr - Construct a universal address string from @sap. 256 * rpc_sockaddr2uaddr - Construct a universal address string from @sap.
257 * @sap: socket address 257 * @sap: socket address
258 * @gfp_flags: allocation mode
258 * 259 *
259 * Returns a %NUL-terminated string in dynamically allocated memory; 260 * Returns a %NUL-terminated string in dynamically allocated memory;
260 * otherwise NULL is returned if an error occurred. Caller must 261 * otherwise NULL is returned if an error occurred. Caller must
261 * free the returned string. 262 * free the returned string.
262 */ 263 */
263char *rpc_sockaddr2uaddr(const struct sockaddr *sap) 264char *rpc_sockaddr2uaddr(const struct sockaddr *sap, gfp_t gfp_flags)
264{ 265{
265 char portbuf[RPCBIND_MAXUADDRPLEN]; 266 char portbuf[RPCBIND_MAXUADDRPLEN];
266 char addrbuf[RPCBIND_MAXUADDRLEN]; 267 char addrbuf[RPCBIND_MAXUADDRLEN];
@@ -288,7 +289,7 @@ char *rpc_sockaddr2uaddr(const struct sockaddr *sap)
288 if (strlcat(addrbuf, portbuf, sizeof(addrbuf)) > sizeof(addrbuf)) 289 if (strlcat(addrbuf, portbuf, sizeof(addrbuf)) > sizeof(addrbuf))
289 return NULL; 290 return NULL;
290 291
291 return kstrdup(addrbuf, GFP_KERNEL); 292 return kstrdup(addrbuf, gfp_flags);
292} 293}
293EXPORT_SYMBOL_GPL(rpc_sockaddr2uaddr); 294EXPORT_SYMBOL_GPL(rpc_sockaddr2uaddr);
294 295