Commit 14690fc6 authored by Martin Peschke's avatar Martin Peschke Committed by David S. Miller

[SUNRPC]: 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>
Acked-by: default avatarNeil Brown <neilb@suse.de>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent f8a6d970
...@@ -1237,20 +1237,12 @@ static int content_open(struct inode *inode, struct file *file) ...@@ -1237,20 +1237,12 @@ static int content_open(struct inode *inode, struct file *file)
return res; return res;
} }
static int content_release(struct inode *inode, struct file *file)
{
struct seq_file *m = (struct seq_file *)file->private_data;
struct handle *han = m->private;
kfree(han);
m->private = NULL;
return seq_release(inode, file);
}
static const struct file_operations content_file_operations = { static const struct file_operations content_file_operations = {
.open = content_open, .open = content_open,
.read = seq_read, .read = seq_read,
.llseek = seq_lseek, .llseek = seq_lseek,
.release = content_release, .release = seq_release_private,
}; };
static ssize_t read_flush(struct file *file, char __user *buf, static ssize_t read_flush(struct file *file, char __user *buf,
......
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