diff mbox

fuse: Add missed unlock_page() to fuse_readpages_fill()

Message ID 153200455673.28926.11139427627005446149.stgit@localhost.localdomain (mailing list archive)
State New, archived
Headers show

Commit Message

Kirill Tkhai July 19, 2018, 12:49 p.m. UTC
The above error path returns with page unlocked,
so this place seems also to behave the same.

Signed-off-by: Kirill Tkhai <ktkhai@virtuozzo.com>
---
 fs/fuse/file.c |    1 +
 1 file changed, 1 insertion(+)
diff mbox

Patch

diff --git a/fs/fuse/file.c b/fs/fuse/file.c
index 67648ccbdd43..fe8d84eb714a 100644
--- a/fs/fuse/file.c
+++ b/fs/fuse/file.c
@@ -866,6 +866,7 @@  static int fuse_readpages_fill(void *_data, struct page *page)
 	}
 
 	if (WARN_ON(req->num_pages >= req->max_pages)) {
+		unlock_page(page);
 		fuse_put_request(fc, req);
 		return -EIO;
 	}