From: Martin Peschke Date: Wed, 9 May 2007 09:35:35 +0000 (-0700) Subject: md: cleanup: use seq_release_private() where appropriate X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=c3f94b40e1676172dfa88abfffd8baffe7ac607c;p=GitHub%2Fmt8127%2Fandroid_kernel_alcatel_ttab.git md: cleanup: use seq_release_private() where appropriate We can save some lines of code by using seq_release_private(). Signed-off-by: Martin Peschke Acked-by: Neil Brown Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/drivers/md/md.c b/drivers/md/md.c index 220e8e6fb7bb..afff038ecf6f 100644 --- a/drivers/md/md.c +++ b/drivers/md/md.c @@ -4941,15 +4941,6 @@ static int md_seq_open(struct inode *inode, struct file *file) return error; } -static int md_seq_release(struct inode *inode, struct file *file) -{ - struct seq_file *m = file->private_data; - struct mdstat_info *mi = m->private; - m->private = NULL; - kfree(mi); - return seq_release(inode, file); -} - static unsigned int mdstat_poll(struct file *filp, poll_table *wait) { struct seq_file *m = filp->private_data; @@ -4971,7 +4962,7 @@ static const struct file_operations md_seq_fops = { .open = md_seq_open, .read = seq_read, .llseek = seq_lseek, - .release = md_seq_release, + .release = seq_release_private, .poll = mdstat_poll, };