Commit 27f1b363 authored by Maxim Patlasov's avatar Maxim Patlasov Committed by Miklos Szeredi

fuse: release temporary page if fuse_writepage_locked() failed

tmp_page to be freed if fuse_write_file_get() returns NULL.
Signed-off-by: default avatarMaxim Patlasov <mpatlasov@parallels.com>
Signed-off-by: default avatarMiklos Szeredi <mszeredi@suse.cz>
parent 4237ba43
......@@ -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:
......
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