From: Martin Peschke Date: Tue, 8 May 2007 07:29:26 +0000 (-0700) Subject: proc: cleanup: use seq_release_private() where appropriate X-Git-Tag: v2.6.22-rc1~667 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=09f0892ec7f8068ba1d1fcef4d1fca23ec96e0dd;p=linux-2.6 proc: cleanup: use seq_release_private() where appropriate We can save some lines of code by using seq_release_private(). Signed-off-by: Martin Peschke Cc: "Eric W. Biederman" Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/fs/proc/proc_misc.c b/fs/proc/proc_misc.c index 9ad4978700..5fd49e47f8 100644 --- a/fs/proc/proc_misc.c +++ b/fs/proc/proc_misc.c @@ -428,18 +428,11 @@ static int slabstats_open(struct inode *inode, struct file *file) return ret; } -static int slabstats_release(struct inode *inode, struct file *file) -{ - struct seq_file *m = file->private_data; - kfree(m->private); - return seq_release(inode, file); -} - static const struct file_operations proc_slabstats_operations = { .open = slabstats_open, .read = seq_read, .llseek = seq_lseek, - .release = slabstats_release, + .release = seq_release_private, }; #endif #endif