From: Jeff Layton Date: Tue, 4 Oct 2016 04:07:43 +0000 (-0400) Subject: NFSv4.2: Fix a reference leak in nfs42_proc_layoutstats_generic X-Git-Tag: firefly_0821_release~176^2~4^2~22^2~48 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=52bee8880ff4fddd1c7b520f8af34075a92f644e;p=firefly-linux-kernel-4.4.55.git NFSv4.2: Fix a reference leak in nfs42_proc_layoutstats_generic commit 3f807e5ae5597bd65a6fff684083e8eaa21f3fa7 upstream. The caller of rpc_run_task also gets a reference that must be put. Signed-off-by: Jeff Layton Signed-off-by: Trond Myklebust Signed-off-by: Anna Schumaker Signed-off-by: Greg Kroah-Hartman --- diff --git a/fs/nfs/nfs42proc.c b/fs/nfs/nfs42proc.c index 6b1ce9825430..7f1a0fb8c493 100644 --- a/fs/nfs/nfs42proc.c +++ b/fs/nfs/nfs42proc.c @@ -269,6 +269,7 @@ int nfs42_proc_layoutstats_generic(struct nfs_server *server, task = rpc_run_task(&task_setup); if (IS_ERR(task)) return PTR_ERR(task); + rpc_put_task(task); return 0; }