aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMartin Peschke <mp3@de.ibm.com>2007-05-09 05:35:35 -0400
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-05-09 15:30:57 -0400
commitc3f94b40e1676172dfa88abfffd8baffe7ac607c (patch)
treec5440bae6c2a63cefbf87ef32936b45b46dd357d
parent50511da3da4d984fb944b2e373781b60915daf65 (diff)
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 <mp3@de.ibm.com> Acked-by: Neil Brown <neilb@suse.de> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
-rw-r--r--drivers/md/md.c11
1 files changed, 1 insertions, 10 deletions
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)
4941 return error; 4941 return error;
4942} 4942}
4943 4943
4944static int md_seq_release(struct inode *inode, struct file *file)
4945{
4946 struct seq_file *m = file->private_data;
4947 struct mdstat_info *mi = m->private;
4948 m->private = NULL;
4949 kfree(mi);
4950 return seq_release(inode, file);
4951}
4952
4953static unsigned int mdstat_poll(struct file *filp, poll_table *wait) 4944static unsigned int mdstat_poll(struct file *filp, poll_table *wait)
4954{ 4945{
4955 struct seq_file *m = filp->private_data; 4946 struct seq_file *m = filp->private_data;
@@ -4971,7 +4962,7 @@ static const struct file_operations md_seq_fops = {
4971 .open = md_seq_open, 4962 .open = md_seq_open,
4972 .read = seq_read, 4963 .read = seq_read,
4973 .llseek = seq_lseek, 4964 .llseek = seq_lseek,
4974 .release = md_seq_release, 4965 .release = seq_release_private,
4975 .poll = mdstat_poll, 4966 .poll = mdstat_poll,
4976}; 4967};
4977 4968