Skip to content

Commit 3f807e5

Browse files
jtlaytonamschuma-ntap
authored andcommitted
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 <[email protected]> Cc: [email protected] # 4.2+ Signed-off-by: Trond Myklebust <[email protected]> Signed-off-by: Anna Schumaker <[email protected]>
1 parent 2f86e09 commit 3f807e5

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

fs/nfs/nfs42proc.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -443,6 +443,7 @@ int nfs42_proc_layoutstats_generic(struct nfs_server *server,
443443
task = rpc_run_task(&task_setup);
444444
if (IS_ERR(task))
445445
return PTR_ERR(task);
446+
rpc_put_task(task);
446447
return 0;
447448
}
448449

0 commit comments

Comments
 (0)