[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <200704260727.l3Q7RR5a023964@shell0.pdx.osdl.net>
Date: Thu, 26 Apr 2007 00:27:27 -0700
From: akpm@...ux-foundation.org
To: davem@...emloft.net
Cc: netdev@...r.kernel.org, akpm@...ux-foundation.org, mp3@...ibm.com,
neilb@...e.de, trond.myklebust@....uio.no
Subject: [patch 08/15] sunrpc: cleanup: use seq_release_private() where appropriate
From: Martin Peschke <mp3@...ibm.com>
We can save some lines of code by using seq_release_private().
Signed-off-by: Martin Peschke <mp3@...ibm.com>
Cc: Trond Myklebust <trond.myklebust@....uio.no>
Acked-by: Neil Brown <neilb@...e.de>
Cc: "David S. Miller" <davem@...emloft.net>
Signed-off-by: Andrew Morton <akpm@...ux-foundation.org>
---
net/sunrpc/cache.c | 10 +---------
1 file changed, 1 insertion(+), 9 deletions(-)
diff -puN net/sunrpc/cache.c~sunrpc-cleanup-use-seq_release_private-where-appropriate net/sunrpc/cache.c
--- a/net/sunrpc/cache.c~sunrpc-cleanup-use-seq_release_private-where-appropriate
+++ a/net/sunrpc/cache.c
@@ -1237,20 +1237,12 @@ static int content_open(struct inode *in
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,
_
-
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists