[PATCH] fuse: Add missed unlock_page() to fuse_readpages_fill()

From: Kirill Tkhai
Date: Thu Jul 19 2018 - 08:49:53 EST


The above error path returns with page unlocked,
so this place seems also to behave the same.

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

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;
}