[RHEL7,COMMIT] fuse: Add forgotten unlock_page() into fuse_readpages_fill()

Submitted by Konstantin Khorenko on July 19, 2018, 12:44 p.m.

Details

Message ID 201807191244.w6JCiOWd015648@finist_ce7.work
State New
Series "fuse: Add forgotten unlock_page() into fuse_readpages_fill()"
Headers show

Commit Message

Konstantin Khorenko July 19, 2018, 12:44 p.m.
The commit is pushed to "branch-rh7-3.10.0-862.6.3.vz7.62.x-ovz" and will appear at https://src.openvz.org/scm/ovz/vzkernel.git
after rh7-3.10.0-862.6.3.vz7.62.4
------>
commit c1796c5a0830154fe1d1063f7473973890d5019a
Author: Kirill Tkhai <ktkhai@virtuozzo.com>
Date:   Thu Jul 19 15:44:23 2018 +0300

    fuse: Add forgotten unlock_page() into fuse_readpages_fill()
    
    We have to unlock page on error path as seen at the code
    above the place, this patch modifies. So, just do it.
    
    Signed-off-by: Kirill Tkhai <ktkhai@virtuozzo.com>
---
 fs/fuse/file.c | 1 +
 1 file changed, 1 insertion(+)

Patch hide | download patch | download mbox

diff --git a/fs/fuse/file.c b/fs/fuse/file.c
index d7bd723635ec..d0451cfcd3ee 100644
--- a/fs/fuse/file.c
+++ b/fs/fuse/file.c
@@ -1238,6 +1238,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;
 	}

Comments

Kirill Tkhai July 30, 2018, 10:54 a.m.
On 19.07.2018 15:44, Konstantin Khorenko wrote:
> The commit is pushed to "branch-rh7-3.10.0-862.6.3.vz7.62.x-ovz" and will appear at https://src.openvz.org/scm/ovz/vzkernel.git
> after rh7-3.10.0-862.6.3.vz7.62.4

JFI: Could be marked with "ms" tag: https://git.kernel.org/pub/scm/linux/kernel/git/mszeredi/fuse.git/commit/?h=for-next&id=109728ccc5933151c68d1106e4065478a487a323

> ------>
> commit c1796c5a0830154fe1d1063f7473973890d5019a
> Author: Kirill Tkhai <ktkhai@virtuozzo.com>
> Date:   Thu Jul 19 15:44:23 2018 +0300
> 
>     fuse: Add forgotten unlock_page() into fuse_readpages_fill()
>     
>     We have to unlock page on error path as seen at the code
>     above the place, this patch modifies. So, just do it.
>     
>     Signed-off-by: Kirill Tkhai <ktkhai@virtuozzo.com>
> ---
>  fs/fuse/file.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/fs/fuse/file.c b/fs/fuse/file.c
> index d7bd723635ec..d0451cfcd3ee 100644
> --- a/fs/fuse/file.c
> +++ b/fs/fuse/file.c
> @@ -1238,6 +1238,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;
>  	}
>