Commit ec686c92 authored by Anurup m's avatar Anurup m Committed by Linus Torvalds

fs/fscache/stats.c: fix memory leak

There is a kernel memory leak observed when the proc file
/proc/fs/fscache/stats is read.

The reason is that in fscache_stats_open, single_open is called and the
respective release function is not called during release.  Hence fix
with correct release function - single_release().

Addresses default avatarAnurup m <>
Cc: shyju pv <>
Cc: Sanil kumar <>
Cc: Nataraj m <>
Cc: Li Zefan <>
Cc: David Howells <>
Cc: <>
Signed-off-by: default avatarAndrew Morton <>
Signed-off-by: default avatarLinus Torvalds <>
parent ee8ad726
......@@ -287,5 +287,5 @@ const struct file_operations fscache_stats_fops = {
.open = fscache_stats_open,
.read = seq_read,
.llseek = seq_lseek,
.release = seq_release,
.release = single_release,
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment