diff options
Diffstat (limited to 'net/sunrpc/cache.c')
-rw-r--r-- | net/sunrpc/cache.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/net/sunrpc/cache.c b/net/sunrpc/cache.c index 73f053d0cc7a..d27bbe0ee907 100644 --- a/net/sunrpc/cache.c +++ b/net/sunrpc/cache.c | |||
@@ -1244,18 +1244,18 @@ static ssize_t read_flush(struct file *file, char __user *buf, | |||
1244 | struct cache_detail *cd = PDE(file->f_path.dentry->d_inode)->data; | 1244 | struct cache_detail *cd = PDE(file->f_path.dentry->d_inode)->data; |
1245 | char tbuf[20]; | 1245 | char tbuf[20]; |
1246 | unsigned long p = *ppos; | 1246 | unsigned long p = *ppos; |
1247 | int len; | 1247 | size_t len; |
1248 | 1248 | ||
1249 | sprintf(tbuf, "%lu\n", cd->flush_time); | 1249 | sprintf(tbuf, "%lu\n", cd->flush_time); |
1250 | len = strlen(tbuf); | 1250 | len = strlen(tbuf); |
1251 | if (p >= len) | 1251 | if (p >= len) |
1252 | return 0; | 1252 | return 0; |
1253 | len -= p; | 1253 | len -= p; |
1254 | if (len > count) len = count; | 1254 | if (len > count) |
1255 | len = count; | ||
1255 | if (copy_to_user(buf, (void*)(tbuf+p), len)) | 1256 | if (copy_to_user(buf, (void*)(tbuf+p), len)) |
1256 | len = -EFAULT; | 1257 | return -EFAULT; |
1257 | else | 1258 | *ppos += len; |
1258 | *ppos += len; | ||
1259 | return len; | 1259 | return len; |
1260 | } | 1260 | } |
1261 | 1261 | ||