Commit 878e66d0 authored by Linus Torvalds's avatar Linus Torvalds

Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs

Pull misc vfs fixes from Al Viro.

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs:
  seq_file: fix incomplete reset on read from zero offset
  kernfs: fix regression in kernfs_fop_write caused by wrong type
parents c839682c cf5eebae
...@@ -275,7 +275,7 @@ static ssize_t kernfs_fop_write(struct file *file, const char __user *user_buf, ...@@ -275,7 +275,7 @@ static ssize_t kernfs_fop_write(struct file *file, const char __user *user_buf,
{ {
struct kernfs_open_file *of = kernfs_of(file); struct kernfs_open_file *of = kernfs_of(file);
const struct kernfs_ops *ops; const struct kernfs_ops *ops;
size_t len; ssize_t len;
char *buf; char *buf;
if (of->atomic_write_len) { if (of->atomic_write_len) {
......
...@@ -181,8 +181,11 @@ ssize_t seq_read(struct file *file, char __user *buf, size_t size, loff_t *ppos) ...@@ -181,8 +181,11 @@ ssize_t seq_read(struct file *file, char __user *buf, size_t size, loff_t *ppos)
* if request is to read from zero offset, reset iterator to first * if request is to read from zero offset, reset iterator to first
* record as it might have been already advanced by previous requests * record as it might have been already advanced by previous requests
*/ */
if (*ppos == 0) if (*ppos == 0) {
m->index = 0; m->index = 0;
m->version = 0;
m->count = 0;
}
/* Don't assume *ppos is where we left it */ /* Don't assume *ppos is where we left it */
if (unlikely(*ppos != m->read_pos)) { if (unlikely(*ppos != m->read_pos)) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment