summaryrefslogtreecommitdiffstats
path: root/fs/nfs/dns_resolve.c
diff options
context:
space:
mode:
authorArnd Bergmann <arnd@arndb.de>2012-11-12 15:26:41 +0100
committerArnd Bergmann <arnd@arndb.de>2012-11-12 15:26:41 +0100
commitb68c50d836517cf662145b2e7d5cdf40a38b24f1 (patch)
treebcd0796a008f640d450dc1b4d27cb414f3828082 /fs/nfs/dns_resolve.c
parent5bd09fb0336aa4020b85f13e16a4d21e3f5f70c3 (diff)
parent84cee34db4d34b9059f4ef66f7d1805e438cc7f3 (diff)
Merge branch 'lpc32xx/core' of git://git.antcom.de/linux-2.6 into next/soc
Patches from Roland Stigge <stigge@antcom.de>: Platform topic branch for lpc32xx * 'lpc32xx/core' of git://git.antcom.de/linux-2.6: ARM: LPC32xx: Add the motor PWM clock ARM: LPC32xx: Cleanup irq.c ARM: LPC32xx: Relocate calls to irq_set_chained_handler() ARM: LPC32xx: Remove superfluous irq_alloc_descs() Includes an update to v3.7-rc4 Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Diffstat (limited to 'fs/nfs/dns_resolve.c')
-rw-r--r--fs/nfs/dns_resolve.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/fs/nfs/dns_resolve.c b/fs/nfs/dns_resolve.c
index 31c26c4dcc2..ca4b11ec87a 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();