From: Martin Peschke Date: Thu, 26 Apr 2007 08:03:43 +0000 (-0700) Subject: [SUNRPC]: cleanup: use seq_release_private() where appropriate X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=14690fc649f4c59712f497135f7323eb8ceceaaf;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git [SUNRPC]: 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: David S. Miller --- diff --git a/net/sunrpc/cache.c b/net/sunrpc/cache.c index f02f24ae9468..543b085ae2c1 100644 --- a/net/sunrpc/cache.c +++ b/net/sunrpc/cache.c @@ -1237,20 +1237,12 @@ static int content_open(struct inode *inode, struct file *file) 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 = { .open = content_open, .read = seq_read, .llseek = seq_lseek, - .release = content_release, + .release = seq_release_private, }; static ssize_t read_flush(struct file *file, char __user *buf,