From 09b9568e926cd737aeb13900a85f7d06eeee28e0 Mon Sep 17 00:00:00 2001 From: Paolo 'Blaisorblade' Giarrusso Date: Fri, 26 Aug 2005 16:57:53 +0200 Subject: [PATCH] --- yaml --- r: 6001 b: refs/heads/master c: fd589e0b662c1ea8cfb1e0d20d60a2510979865b h: refs/heads/master i: 5999: 05bdf71070e5f1db534dea2ee793173f77506f98 v: v3 --- [refs] | 2 +- trunk/fs/hppfs/hppfs_kern.c | 24 +++++++++--------------- 2 files changed, 10 insertions(+), 16 deletions(-) diff --git a/[refs] b/[refs] index 656935dad4f6..24af461aefd1 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: d7a60d50d7713b65a3fd88f11d5717b83a6b6a97 +refs/heads/master: fd589e0b662c1ea8cfb1e0d20d60a2510979865b diff --git a/trunk/fs/hppfs/hppfs_kern.c b/trunk/fs/hppfs/hppfs_kern.c index 385d440fa234..52930915bad8 100644 --- a/trunk/fs/hppfs/hppfs_kern.c +++ b/trunk/fs/hppfs/hppfs_kern.c @@ -38,7 +38,7 @@ struct hppfs_inode_info { static inline struct hppfs_inode_info *HPPFS_I(struct inode *inode) { - return(list_entry(inode, struct hppfs_inode_info, vfs_inode)); + return container_of(inode, struct hppfs_inode_info, vfs_inode); } #define HPPFS_SUPER_MAGIC 0xb00000ee @@ -662,38 +662,32 @@ static int hppfs_readlink(struct dentry *dentry, char *buffer, int buflen) { struct file *proc_file; struct dentry *proc_dentry; - int (*readlink)(struct dentry *, char *, int); - int err, n; + int ret; proc_dentry = HPPFS_I(dentry->d_inode)->proc_dentry; proc_file = dentry_open(dget(proc_dentry), NULL, O_RDONLY); - err = PTR_ERR(proc_dentry); - if(IS_ERR(proc_dentry)) - return(err); + if (IS_ERR(proc_file)) + return PTR_ERR(proc_file); - readlink = proc_dentry->d_inode->i_op->readlink; - n = (*readlink)(proc_dentry, buffer, buflen); + ret = proc_dentry->d_inode->i_op->readlink(proc_dentry, buffer, buflen); fput(proc_file); - return(n); + return ret; } static void* hppfs_follow_link(struct dentry *dentry, struct nameidata *nd) { struct file *proc_file; struct dentry *proc_dentry; - void * (*follow_link)(struct dentry *, struct nameidata *); void *ret; proc_dentry = HPPFS_I(dentry->d_inode)->proc_dentry; proc_file = dentry_open(dget(proc_dentry), NULL, O_RDONLY); + if (IS_ERR(proc_file)) + return proc_file; - if (IS_ERR(proc_dentry)) - return proc_dentry; - - follow_link = proc_dentry->d_inode->i_op->follow_link; - ret = (*follow_link)(proc_dentry, nd); + ret = proc_dentry->d_inode->i_op->follow_link(proc_dentry, nd); fput(proc_file);