瀏覽代碼

NFSv4.2: Fix a reference leak in nfs42_proc_layoutstats_generic

The caller of rpc_run_task also gets a reference that must be put.

Signed-off-by: Jeff Layton <jeff.layton@primarydata.com>
Cc: stable@vger.kernel.org # 4.2+
Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com>
Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com>
Jeff Layton 8 年之前
父節點
當前提交
3f807e5ae5
共有 1 個文件被更改,包括 1 次插入0 次删除
  1. 1 0
      fs/nfs/nfs42proc.c

+ 1 - 0
fs/nfs/nfs42proc.c

@@ -443,6 +443,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;
 }