fuse: writepages: roll back changes if request not found
authorMaxim Patlasov <MPatlasov@parallels.com>
Wed, 2 Oct 2013 11:01:07 +0000 (15:01 +0400)
committerMiklos Szeredi <mszeredi@suse.cz>
Tue, 5 Nov 2013 09:11:26 +0000 (10:11 +0100)
commitf6011081f5e290756bd90fe96f1e86d3eac76f77
tree12c724c1dcb89f2618ff39457941593f10749a96
parentcb2ffb26e67ef89c44f46e971440cda2f83ae236
fuse: writepages: roll back changes if request not found

fuse_writepage_in_flight() returns false if it fails to find request with
given index in fi->writepages.  Then the caller proceeds with populating
data->orig_pages[] and incrementing req->num_pages.  Hence,
fuse_writepage_in_flight() must revert changes it made in request before
returning false.

Signed-off-by: Maxim Patlasov <MPatlasov@parallels.com>
Signed-off-by: Miklos Szeredi <mszeredi@suse.cz>
fs/fuse/file.c