fuse: Add missed unlock_page() to fuse_readpages_fill()
authorKirill Tkhai <ktkhai@virtuozzo.com>
Thu, 19 Jul 2018 12:49:39 +0000 (15:49 +0300)
committerMiklos Szeredi <mszeredi@redhat.com>
Thu, 26 Jul 2018 14:13:12 +0000 (16:13 +0200)
The above error path returns with page unlocked, so this place seems also
to behave the same.

Fixes: f8dbdf81821b ("fuse: rework fuse_readpages()")
Signed-off-by: Kirill Tkhai <ktkhai@virtuozzo.com>
Signed-off-by: Miklos Szeredi <mszeredi@redhat.com>
fs/fuse/file.c

index a201fb0ac64f9cd7f978a82806167db6f9555aeb..aa23749a943b21e87a42e4a2bd5f40ee469f2724 100644 (file)
@@ -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;
        }