diff options
| author | Al Viro <viro@zeniv.linux.org.uk> | 2012-11-16 22:28:34 -0500 |
|---|---|---|
| committer | Al Viro <viro@zeniv.linux.org.uk> | 2012-11-16 22:28:34 -0500 |
| commit | 9526d9bc23f362035cfabf044aa90f4ed1787955 (patch) | |
| tree | 3c24639de58cfaebc9f2616750dedfdad4251c35 /fs/nfs/dns_resolve.c | |
| parent | d042f3135e5e3a0132942335dea0155ae86a7308 (diff) | |
| parent | 6929039761a3414e5c71448eb3dcc1d82fc1891d (diff) | |
Merge branch 'arch-arm64' into no-rebases
Diffstat (limited to 'fs/nfs/dns_resolve.c')
| -rw-r--r-- | fs/nfs/dns_resolve.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/fs/nfs/dns_resolve.c b/fs/nfs/dns_resolve.c index 31c26c4dcc23..ca4b11ec87a2 100644 --- a/fs/nfs/dns_resolve.c +++ b/fs/nfs/dns_resolve.c @@ -217,7 +217,7 @@ static int nfs_dns_parse(struct cache_detail *cd, char *buf, int buflen) { char buf1[NFS_DNS_HOSTNAME_MAXLEN+1]; struct nfs_dns_ent key, *item; - unsigned long ttl; + unsigned int ttl; ssize_t len; int ret = -EINVAL; @@ -240,7 +240,8 @@ static int nfs_dns_parse(struct cache_detail *cd, char *buf, int buflen) key.namelen = len; memset(&key.h, 0, sizeof(key.h)); - ttl = get_expiry(&buf); + if (get_uint(&buf, &ttl) < 0) + goto out; if (ttl == 0) goto out; key.h.expiry_time = ttl + seconds_since_boot(); |
