summaryrefslogtreecommitdiff
path: root/fs
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2016-08-27 09:12:12 +0300
committerLinus Torvalds <torvalds@linux-foundation.org>2016-08-27 09:12:12 +0300
commit5e608a027082ae426e100a582031e0ff40becc83 (patch)
tree7696ef52b7ea1e873dc367dbc2843bedcc09c6b1 /fs
parent65fc7d54efb6b03dcf61d98aa0fd68fe968c211c (diff)
parent11bd969fdefea3ac0cb9791224f1e09784e21e58 (diff)
downloadlinux-5e608a027082ae426e100a582031e0ff40becc83.tar.xz
Merge branch 'akpm' (patches from Andrew)
Merge fixes from Andrew Morton: "11 fixes" * emailed patches from Andrew Morton <akpm@linux-foundation.org>: mm: silently skip readahead for DAX inodes dax: fix device-dax region base fs/seq_file: fix out-of-bounds read mm: memcontrol: avoid unused function warning mm: clarify COMPACTION Kconfig text treewide: replace config_enabled() with IS_ENABLED() (2nd round) printk: fix parsing of "brl=" option soft_dirty: fix soft_dirty during THP split sysctl: handle error writing UINT_MAX to u32 fields get_maintainer: quiet noisy implicit -f vcs_file_exists checking byteswap: don't use __builtin_bswap*() with sparse
Diffstat (limited to 'fs')
-rw-r--r--fs/seq_file.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/fs/seq_file.c b/fs/seq_file.c
index 19f532e7d35e..6dc4296eed62 100644
--- a/fs/seq_file.c
+++ b/fs/seq_file.c
@@ -223,8 +223,10 @@ ssize_t seq_read(struct file *file, char __user *buf, size_t size, loff_t *ppos)
size -= n;
buf += n;
copied += n;
- if (!m->count)
+ if (!m->count) {
+ m->from = 0;
m->index++;
+ }
if (!size)
goto Done;
}