X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=net%2Fsunrpc%2Fcache.c;h=01c3c41052048253b309946d62b9d7c65afea0e3;hb=d7f5e3df3574c6e38b99f5fe22f15540b2b9811d;hp=f02f24ae946877516d2fd8050c40aebb8ba7f43c;hpb=6f8c480f998a619082f18407f8d7f4c29e94dc6e;p=linux-2.6 diff --git a/net/sunrpc/cache.c b/net/sunrpc/cache.c index f02f24ae94..01c3c41052 100644 --- a/net/sunrpc/cache.c +++ b/net/sunrpc/cache.c @@ -1210,7 +1210,7 @@ static int c_show(struct seq_file *m, void *p) return cd->cache_show(m, cd, cp); } -static struct seq_operations cache_content_op = { +static const struct seq_operations cache_content_op = { .start = c_start, .next = c_next, .stop = c_stop, @@ -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,