fuse: verify write return
Make sure filesystem is not returning a bogus number of bytes written.
Fixes: ea9b9907b8
("fuse: implement perform_write")
Cc: <stable@vger.kernel.org> # v2.6.26
Signed-off-by: Miklos Szeredi <mszeredi@redhat.com>
This commit is contained in:
parent
eb59bd17d2
commit
8aab336b14
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue