Commit 09f0892e authored by Martin Peschke's avatar Martin Peschke Committed by Linus Torvalds

proc: cleanup: use seq_release_private() where appropriate

We can save some lines of code by using seq_release_private().
Signed-off-by: default avatarMartin Peschke <mp3@de.ibm.com>
Cc: "Eric W. Biederman" <ebiederm@xmission.com>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 5a0c6a0d
...@@ -428,18 +428,11 @@ static int slabstats_open(struct inode *inode, struct file *file) ...@@ -428,18 +428,11 @@ static int slabstats_open(struct inode *inode, struct file *file)
return ret; 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 = { static const struct file_operations proc_slabstats_operations = {
.open = slabstats_open, .open = slabstats_open,
.read = seq_read, .read = seq_read,
.llseek = seq_lseek, .llseek = seq_lseek,
.release = slabstats_release, .release = seq_release_private,
}; };
#endif #endif
#endif #endif
......
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