diff options
author | Martin Peschke <mp3@de.ibm.com> | 2007-04-26 04:03:43 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2007-04-26 04:03:43 -0400 |
commit | 14690fc649f4c59712f497135f7323eb8ceceaaf (patch) | |
tree | 2158421b144cde2c239458f74afb46b70cb28b65 | |
parent | f8a6d97043f9adc25889876b681998b77f543bfa (diff) |
[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 <mp3@de.ibm.com>
Acked-by: Neil Brown <neilb@suse.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r-- | net/sunrpc/cache.c | 10 |
1 files changed, 1 insertions, 9 deletions
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) | |||
1237 | 1237 | ||
1238 | return res; | 1238 | return res; |
1239 | } | 1239 | } |
1240 | static int content_release(struct inode *inode, struct file *file) | ||
1241 | { | ||
1242 | struct seq_file *m = (struct seq_file *)file->private_data; | ||
1243 | struct handle *han = m->private; | ||
1244 | kfree(han); | ||
1245 | m->private = NULL; | ||
1246 | return seq_release(inode, file); | ||
1247 | } | ||
1248 | 1240 | ||
1249 | static const struct file_operations content_file_operations = { | 1241 | static const struct file_operations content_file_operations = { |
1250 | .open = content_open, | 1242 | .open = content_open, |
1251 | .read = seq_read, | 1243 | .read = seq_read, |
1252 | .llseek = seq_lseek, | 1244 | .llseek = seq_lseek, |
1253 | .release = content_release, | 1245 | .release = seq_release_private, |
1254 | }; | 1246 | }; |
1255 | 1247 | ||
1256 | static ssize_t read_flush(struct file *file, char __user *buf, | 1248 | static ssize_t read_flush(struct file *file, char __user *buf, |