• NeilBrown's avatar
    NFS: fix bug in legacy DNS resolver. · 8d96b106
    NeilBrown authored
    The DNS resolver's use of the sunrpc cache involves a 'ttl' number
    (relative) rather that a timeout (absolute).  This confused me when
    I wrote
      commit c5b29f88
         "sunrpc: use seconds since boot in expiry cache"
    
    and I managed to break it.  The effect is that any TTL is interpreted
    as 0, and nothing useful gets into the cache.
    
    This patch removes the use of get_expiry() - which really expects an
    expiry time - and uses get_uint() instead, treating the int correctly
    as a ttl.
    
    This fixes a regression that has been present since 2.6.37, causing
    certain NFS accesses in certain environments to incorrectly fail.
    Reported-by: default avatarChuck Lever <chuck.lever@oracle.com>
    Tested-by: default avatarChuck Lever <chuck.lever@oracle.com>
    Cc: stable@vger.kernel.org
    Signed-off-by: default avatarNeilBrown <neilb@suse.de>
    Signed-off-by: default avatarTrond Myklebust <Trond.Myklebust@netapp.com>
    8d96b106
dns_resolve.c 9.6 KB