Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=ec931035194709d0cde647d1c347bbf9634eec25
Commit:     ec931035194709d0cde647d1c347bbf9634eec25
Parent:     a662d4cb50d3976d2c9c9bac34119d0036e31d21
Author:     Pavel Emelyanov <[EMAIL PROTECTED]>
AuthorDate: Wed Oct 10 02:31:07 2007 -0700
Committer:  David S. Miller <[EMAIL PROTECTED]>
CommitDate: Wed Oct 10 16:55:36 2007 -0700

    [SUNRPC]: Make the sunrpc use the seq_open_private()
    
    Just switch to the consolidated code.
    
    Signed-off-by: Pavel Emelyanov <[EMAIL PROTECTED]>
    Signed-off-by: David S. Miller <[EMAIL PROTECTED]>
---
 net/sunrpc/cache.c |   12 ++----------
 1 files changed, 2 insertions(+), 10 deletions(-)

diff --git a/net/sunrpc/cache.c b/net/sunrpc/cache.c
index ebe344f..8e05557 100644
--- a/net/sunrpc/cache.c
+++ b/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 = {
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to