diff options
author | Chuck Lever <chuck.lever@oracle.com> | 2009-08-09 15:09:37 -0400 |
---|---|---|
committer | Trond Myklebust <Trond.Myklebust@netapp.com> | 2009-08-09 15:09:37 -0400 |
commit | ec6ee61250acfccbc5578dd4014735fb2cbe53b5 (patch) | |
tree | 90c93d506b82d7c67ed8208410a1024e872f9c8d /fs/nfs/internal.h | |
parent | 53a0b9c4c99ab0085a06421f71592722e5b3fd5f (diff) |
NFS: Replace nfs_set_port() with rpc_set_port()
Clean up.
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Diffstat (limited to 'fs/nfs/internal.h')
-rw-r--r-- | fs/nfs/internal.h | 19 |
1 files changed, 0 insertions, 19 deletions
diff --git a/fs/nfs/internal.h b/fs/nfs/internal.h index cf1da3e22004..c2f171a3d70e 100644 --- a/fs/nfs/internal.h +++ b/fs/nfs/internal.h | |||
@@ -368,22 +368,3 @@ unsigned int nfs_page_array_len(unsigned int base, size_t len) | |||
368 | return ((unsigned long)len + (unsigned long)base + | 368 | return ((unsigned long)len + (unsigned long)base + |
369 | PAGE_SIZE - 1) >> PAGE_SHIFT; | 369 | PAGE_SIZE - 1) >> PAGE_SHIFT; |
370 | } | 370 | } |
371 | |||
372 | /* | ||
373 | * Set the port number in an address. Be agnostic about the address | ||
374 | * family. | ||
375 | */ | ||
376 | static inline void nfs_set_port(struct sockaddr *sap, unsigned short port) | ||
377 | { | ||
378 | struct sockaddr_in *ap = (struct sockaddr_in *)sap; | ||
379 | struct sockaddr_in6 *ap6 = (struct sockaddr_in6 *)sap; | ||
380 | |||
381 | switch (sap->sa_family) { | ||
382 | case AF_INET: | ||
383 | ap->sin_port = htons(port); | ||
384 | break; | ||
385 | case AF_INET6: | ||
386 | ap6->sin6_port = htons(port); | ||
387 | break; | ||
388 | } | ||
389 | } | ||