Loading fs/nfs/dns_resolve.c +12 −3 Original line number Original line Diff line number Diff line Loading @@ -65,6 +65,7 @@ struct nfs_dns_ent { struct sockaddr_storage addr; struct sockaddr_storage addr; size_t addrlen; size_t addrlen; struct rcu_head rcu_head; }; }; Loading Loading @@ -101,15 +102,23 @@ static void nfs_dns_ent_init(struct cache_head *cnew, } } } } static void nfs_dns_ent_put(struct kref *ref) static void nfs_dns_ent_free_rcu(struct rcu_head *head) { { struct nfs_dns_ent *item; struct nfs_dns_ent *item; item = container_of(ref, struct nfs_dns_ent, h.ref); item = container_of(head, struct nfs_dns_ent, rcu_head); kfree(item->hostname); kfree(item->hostname); kfree(item); kfree(item); } } static void nfs_dns_ent_put(struct kref *ref) { struct nfs_dns_ent *item; item = container_of(ref, struct nfs_dns_ent, h.ref); call_rcu(item, nfs_dns_ent_free_rcu); } static struct cache_head *nfs_dns_ent_alloc(void) static struct cache_head *nfs_dns_ent_alloc(void) { { struct nfs_dns_ent *item = kmalloc(sizeof(*item), GFP_KERNEL); struct nfs_dns_ent *item = kmalloc(sizeof(*item), GFP_KERNEL); Loading Loading @@ -195,7 +204,7 @@ static struct nfs_dns_ent *nfs_dns_lookup(struct cache_detail *cd, { { struct cache_head *ch; struct cache_head *ch; ch = sunrpc_cache_lookup(cd, ch = sunrpc_cache_lookup_rcu(cd, &key->h, &key->h, nfs_dns_hash(key)); nfs_dns_hash(key)); if (!ch) if (!ch) Loading Loading
fs/nfs/dns_resolve.c +12 −3 Original line number Original line Diff line number Diff line Loading @@ -65,6 +65,7 @@ struct nfs_dns_ent { struct sockaddr_storage addr; struct sockaddr_storage addr; size_t addrlen; size_t addrlen; struct rcu_head rcu_head; }; }; Loading Loading @@ -101,15 +102,23 @@ static void nfs_dns_ent_init(struct cache_head *cnew, } } } } static void nfs_dns_ent_put(struct kref *ref) static void nfs_dns_ent_free_rcu(struct rcu_head *head) { { struct nfs_dns_ent *item; struct nfs_dns_ent *item; item = container_of(ref, struct nfs_dns_ent, h.ref); item = container_of(head, struct nfs_dns_ent, rcu_head); kfree(item->hostname); kfree(item->hostname); kfree(item); kfree(item); } } static void nfs_dns_ent_put(struct kref *ref) { struct nfs_dns_ent *item; item = container_of(ref, struct nfs_dns_ent, h.ref); call_rcu(item, nfs_dns_ent_free_rcu); } static struct cache_head *nfs_dns_ent_alloc(void) static struct cache_head *nfs_dns_ent_alloc(void) { { struct nfs_dns_ent *item = kmalloc(sizeof(*item), GFP_KERNEL); struct nfs_dns_ent *item = kmalloc(sizeof(*item), GFP_KERNEL); Loading Loading @@ -195,7 +204,7 @@ static struct nfs_dns_ent *nfs_dns_lookup(struct cache_detail *cd, { { struct cache_head *ch; struct cache_head *ch; ch = sunrpc_cache_lookup(cd, ch = sunrpc_cache_lookup_rcu(cd, &key->h, &key->h, nfs_dns_hash(key)); nfs_dns_hash(key)); if (!ch) if (!ch) Loading