From b33d7af91000fd86b1ed29e5785800bc7e30e86b Mon Sep 17 00:00:00 2001 From: Pavel Emelyanov Date: Wed, 10 Oct 2007 02:31:07 -0700 Subject: [PATCH] --- yaml --- r: 67013 b: refs/heads/master c: ec931035194709d0cde647d1c347bbf9634eec25 h: refs/heads/master i: 67011: 18c8ad82b2db2d5750d143f39e7b2aba5e5449f2 v: v3 --- [refs] | 2 +- trunk/net/sunrpc/cache.c | 12 ++---------- 2 files changed, 3 insertions(+), 11 deletions(-) diff --git a/[refs] b/[refs] index 9562a12fe6bb..763a2b9948bb 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: a662d4cb50d3976d2c9c9bac34119d0036e31d21 +refs/heads/master: ec931035194709d0cde647d1c347bbf9634eec25 diff --git a/trunk/net/sunrpc/cache.c b/trunk/net/sunrpc/cache.c index ebe344f34d1a..8e05557414ce 100644 --- a/trunk/net/sunrpc/cache.c +++ b/trunk/net/sunrpc/cache.c @@ -1218,23 +1218,15 @@ static const struct seq_operations cache_content_op = { static int content_open(struct inode *inode, struct file *file) { - int res; struct handle *han; struct cache_detail *cd = PDE(inode)->data; - han = kmalloc(sizeof(*han), GFP_KERNEL); + han = __seq_open_private(file, &cache_content_op, sizeof(*han)); if (han == NULL) return -ENOMEM; han->cd = cd; - - res = seq_open(file, &cache_content_op); - if (res) - kfree(han); - else - ((struct seq_file *)file->private_data)->private = han; - - return res; + return 0; } static const struct file_operations content_file_operations = {