]> git.baikalelectronics.ru Git - kernel.git/commit
NFS: fix bug in legacy DNS resolver.
authorNeilBrown <neilb@suse.de>
Wed, 31 Oct 2012 01:16:01 +0000 (12:16 +1100)
committerTrond Myklebust <Trond.Myklebust@netapp.com>
Wed, 31 Oct 2012 20:25:59 +0000 (16:25 -0400)
commit8e61209c67bd524b43c0a0e0e73ddde6f141b062
tree13e1e4d63538e1f0177b64fee0b8ab7e96786089
parent7f447bc1b572ed8d8fb4ed62643da3ffdf31ce4e
NFS: fix bug in legacy DNS resolver.

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 e7a3b74882633a3ea1f56572de8c4a7be52f5873
     "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: Chuck Lever <chuck.lever@oracle.com>
Tested-by: Chuck Lever <chuck.lever@oracle.com>
Cc: stable@vger.kernel.org
Signed-off-by: NeilBrown <neilb@suse.de>
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
fs/nfs/dns_resolve.c