]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - net/sunrpc/cache.c
[IPV6]: Consolidate the ip6_pol_route_(input|output) pair
[linux-2.6-omap-h63xx.git] / net / sunrpc / cache.c
index ebe344f34d1ae741c9696db10785d971f49450a4..8e05557414cebfd522ea5dd0a056d6d95399588d 100644 (file)
@@ -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 = {