[PATCH 4.8 081/140] NFSv4.2: Fix a reference leak in nfs42_proc_layoutstats_generic
From: Greg Kroah-Hartman
Date: Wed Oct 26 2016 - 08:29:23 EST
4.8-stable review patch. If anyone has any objections, please let me know.
------------------
From: Jeff Layton <jlayton@xxxxxxxxxxxxxxx>
commit 3f807e5ae5597bd65a6fff684083e8eaa21f3fa7 upstream.
The caller of rpc_run_task also gets a reference that must be put.
Signed-off-by: Jeff Layton <jeff.layton@xxxxxxxxxxxxxxx>
Signed-off-by: Trond Myklebust <trond.myklebust@xxxxxxxxxxxxxxx>
Signed-off-by: Anna Schumaker <Anna.Schumaker@xxxxxxxxxx>
Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>
---
fs/nfs/nfs42proc.c | 1 +
1 file changed, 1 insertion(+)
--- a/fs/nfs/nfs42proc.c
+++ b/fs/nfs/nfs42proc.c
@@ -443,6 +443,7 @@ int nfs42_proc_layoutstats_generic(struc
task = rpc_run_task(&task_setup);
if (IS_ERR(task))
return PTR_ERR(task);
+ rpc_put_task(task);
return 0;
}