fuse: release temporary page if fuse_writepage_locked() failed

tmp_page to be freed if fuse_write_file_get() returns NULL.

Signed-off-by: Maxim Patlasov <mpatlasov@parallels.com>
Signed-off-by: Miklos Szeredi <mszeredi@suse.cz>
This commit is contained in:
Maxim Patlasov 2014-07-10 15:32:43 +04:00 committed by Miklos Szeredi
parent 4237ba43b6
commit 27f1b36326
1 changed files with 3 additions and 1 deletions

View File

@ -1722,7 +1722,7 @@ static int fuse_writepage_locked(struct page *page)
error = -EIO;
req->ff = fuse_write_file_get(fc, fi);
if (!req->ff)
goto err_free;
goto err_nofile;
fuse_write_fill(req, req->ff, page_offset(page), 0);
@ -1750,6 +1750,8 @@ static int fuse_writepage_locked(struct page *page)
return 0;
err_nofile:
__free_page(tmp_page);
err_free:
fuse_request_free(req);
err: