From: Maxim Patlasov Date: Thu, 10 Jul 2014 11:32:43 +0000 (+0400) Subject: fuse: release temporary page if fuse_writepage_locked() failed X-Git-Url: http://git.cdn.openwrt.org/?a=commitdiff_plain;h=27f1b36326bc8b6911e7052bc4b80a10234f0ec5;p=openwrt%2Fstaging%2Fblogic.git 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 Signed-off-by: Miklos Szeredi --- diff --git a/fs/fuse/file.c b/fs/fuse/file.c index 96d513e01a5d..35b6f31ecc38 100644 --- a/fs/fuse/file.c +++ b/fs/fuse/file.c @@ -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: