]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/blob - releases/4.6.5/nfs-fix-a-double-page-unlock.patch
5.1-stable patches
[thirdparty/kernel/stable-queue.git] / releases / 4.6.5 / nfs-fix-a-double-page-unlock.patch
1 From cbebaf897e5c4862567eb799dc84acc5d7ee2678 Mon Sep 17 00:00:00 2001
2 From: Trond Myklebust <trond.myklebust@primarydata.com>
3 Date: Fri, 17 Jun 2016 16:48:25 -0400
4 Subject: NFS: Fix a double page unlock
5
6 From: Trond Myklebust <trond.myklebust@primarydata.com>
7
8 commit cbebaf897e5c4862567eb799dc84acc5d7ee2678 upstream.
9
10 Since commit 0bcbf039f6b2, nfs_readpage_release() has been used to
11 unlock the page in the read code.
12
13 Fixes: 0bcbf039f6b2 ("nfs: handle request add failure properly")
14 Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com>
15 Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com>
16 Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
17
18 ---
19 fs/nfs/read.c | 4 ++--
20 1 file changed, 2 insertions(+), 2 deletions(-)
21
22 --- a/fs/nfs/read.c
23 +++ b/fs/nfs/read.c
24 @@ -367,13 +367,13 @@ readpage_async_filler(void *data, struct
25 nfs_list_remove_request(new);
26 nfs_readpage_release(new);
27 error = desc->pgio->pg_error;
28 - goto out_unlock;
29 + goto out;
30 }
31 return 0;
32 out_error:
33 error = PTR_ERR(new);
34 -out_unlock:
35 unlock_page(page);
36 +out:
37 return error;
38 }
39