diff options
author | Chuck Lever <chuck.lever@oracle.com> | 2008-09-03 14:35:54 -0400 |
---|---|---|
committer | J. Bruce Fields <bfields@citi.umich.edu> | 2008-09-29 18:13:39 -0400 |
commit | 7e9d7746bfd40121438b155023793796499497d8 (patch) | |
tree | 1b2ba4e1a32d22485bcec946ef4fb6f758067a3a /fs/lockd/host.c | |
parent | 90151e6e4d00a3150d03d52170c246734b274622 (diff) | |
download | linux-7e9d7746bfd40121438b155023793796499497d8.tar.gz linux-7e9d7746bfd40121438b155023793796499497d8.tar.bz2 linux-7e9d7746bfd40121438b155023793796499497d8.zip |
NSM: Use sockaddr_storage for sm_addr field
To store larger addresses in the nsm_handle structure, make sm_addr a
sockaddr_storage.
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
Diffstat (limited to 'fs/lockd/host.c')
-rw-r--r-- | fs/lockd/host.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/fs/lockd/host.c b/fs/lockd/host.c index 3ce2702d0368..510ebcf485f0 100644 --- a/fs/lockd/host.c +++ b/fs/lockd/host.c @@ -551,7 +551,7 @@ retry: if (strlen(pos->sm_name) != hostname_len || memcmp(pos->sm_name, hostname, hostname_len)) continue; - } else if (!nlm_cmp_addr(&pos->sm_addr, sin)) + } else if (!nlm_cmp_addr(nsm_addr_in(pos), sin)) continue; atomic_inc(&pos->sm_count); kfree(nsm); @@ -571,7 +571,8 @@ retry: if (nsm == NULL) return NULL; - nsm->sm_addr = *sin; + memcpy(nsm_addr(nsm), sin, sizeof(*sin)); + nsm->sm_addrlen = sizeof(*sin); nsm->sm_name = (char *) (nsm + 1); memcpy(nsm->sm_name, hostname, hostname_len); nsm->sm_name[hostname_len] = '\0'; |