]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - fs/lockd/host.c
NSM: Use sockaddr_storage for sm_addr field
[linux-2.6-omap-h63xx.git] / fs / lockd / host.c
index 3ce2702d0368c1597e469299510ddfb073afc6d6..510ebcf485f070d222a660df6e5cfce639601876 100644 (file)
@@ -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';