aboutsummaryrefslogtreecommitdiff
path: root/fs
diff options
context:
space:
mode:
authorAnurup m <anurup.m@huawei.com>2013-04-29 15:05:52 -0700
committerWilly Tarreau <w@1wt.eu>2013-06-10 11:43:08 +0200
commit4495d600ba082682bbd6cc17303a3a177f135864 (patch)
tree9a824375dcf93ecf86dde78664e42d00abe4142a /fs
parente5a2fb5600c04a1ea2fea0e36c35ec7409150c56 (diff)
fs/fscache/stats.c: fix memory leak
commit ec686c9239b4d472052a271c505d04dae84214cc upstream. 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 https://bugzilla.kernel.org/show_bug.cgi?id=57101 Signed-off-by: Anurup m <anurup.m@huawei.com> Cc: shyju pv <shyju.pv@huawei.com> Cc: Sanil kumar <sanil.kumar@huawei.com> Cc: Nataraj m <nataraj.m@huawei.com> Cc: Li Zefan <lizefan@huawei.com> Cc: David Howells <dhowells@redhat.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: Willy Tarreau <w@1wt.eu>
Diffstat (limited to 'fs')
-rw-r--r--fs/fscache/stats.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/fscache/stats.c b/fs/fscache/stats.c
index 46435f3aae68..4fd7e1c743f5 100644
--- a/fs/fscache/stats.c
+++ b/fs/fscache/stats.c
@@ -276,5 +276,5 @@ const struct file_operations fscache_stats_fops = {
.open = fscache_stats_open,
.read = seq_read,
.llseek = seq_lseek,
- .release = seq_release,
+ .release = single_release,
};