diff options
Diffstat (limited to 'fs')
-rw-r--r-- | fs/seq_file.c | 4 | ||||
-rw-r--r-- | fs/ubifs/tnc_commit.c | 2 |
2 files changed, 4 insertions, 2 deletions
diff --git a/fs/seq_file.c b/fs/seq_file.c index 555f82155be8..4408057d1dc8 100644 --- a/fs/seq_file.c +++ b/fs/seq_file.c @@ -212,8 +212,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; } diff --git a/fs/ubifs/tnc_commit.c b/fs/ubifs/tnc_commit.c index b45345d701e7..51157da3f76e 100644 --- a/fs/ubifs/tnc_commit.c +++ b/fs/ubifs/tnc_commit.c @@ -370,7 +370,7 @@ static int layout_in_gaps(struct ubifs_info *c, int cnt) p = c->gap_lebs; do { - ubifs_assert(p < c->gap_lebs + sizeof(int) * c->lst.idx_lebs); + ubifs_assert(p < c->gap_lebs + c->lst.idx_lebs); written = layout_leb_in_gaps(c, p); if (written < 0) { err = written; |