Commit 8aab336b authored by Miklos Szeredi's avatar Miklos Szeredi

fuse: verify write return

Make sure filesystem is not returning a bogus number of bytes written.

Fixes: ea9b9907 ("fuse: implement perform_write")
Cc: <stable@vger.kernel.org> # v2.6.26
Signed-off-by: default avatarMiklos Szeredi <mszeredi@redhat.com>
parent eb59bd17
......@@ -1096,6 +1096,8 @@ static ssize_t fuse_send_write_pages(struct fuse_io_args *ia,
ia->write.in.flags = fuse_write_flags(iocb);
err = fuse_simple_request(fc, &ap->args);
if (!err && ia->write.out.size > count)
err = -EIO;
offset = ap->descs[0].offset;
count = ia->write.out.size;
......
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