]> Git Repo - linux.git/blobdiff - fs/nfs/dns_resolve.c
KVM: VMX: Wake vCPU when delivering posted IRQ even if vCPU == this vCPU
[linux.git] / fs / nfs / dns_resolve.c
index 89bd5581f3172cfd0d226632578ec45c25a9b567..e87d500ad95aad74ae48e76896e29d8f02df7778 100644 (file)
@@ -39,7 +39,6 @@ ssize_t nfs_dns_resolve_name(struct net *net, char *name, size_t namelen,
 #include <linux/string.h>
 #include <linux/kmod.h>
 #include <linux/slab.h>
-#include <linux/module.h>
 #include <linux/socket.h>
 #include <linux/seq_file.h>
 #include <linux/inet.h>
@@ -152,12 +151,13 @@ static int nfs_dns_upcall(struct cache_detail *cd,
                struct cache_head *ch)
 {
        struct nfs_dns_ent *key = container_of(ch, struct nfs_dns_ent, h);
-       int ret;
 
-       ret = nfs_cache_upcall(cd, key->hostname);
-       if (ret)
-               ret = sunrpc_cache_pipe_upcall(cd, ch);
-       return ret;
+       if (test_and_set_bit(CACHE_PENDING, &ch->flags))
+               return 0;
+       if (!nfs_cache_upcall(cd, key->hostname))
+               return 0;
+       clear_bit(CACHE_PENDING, &ch->flags);
+       return sunrpc_cache_pipe_upcall_timeout(cd, ch);
 }
 
 static int nfs_dns_match(struct cache_head *ca,
This page took 0.035442 seconds and 4 git commands to generate.