From: Alexander Kuleshov Date: Thu, 12 Feb 2015 23:01:03 +0000 (-0800) Subject: fs: proc: use PDE() to get proc_dir_entry X-Git-Url: http://git.cdn.openwrt.org/?a=commitdiff_plain;h=6bee55f94f971ccf87c8c95c10fa1047ade0f122;p=openwrt%2Fstaging%2Fblogic.git fs: proc: use PDE() to get proc_dir_entry Use the PDE() helper to get proc_dir_entry instead of coding it directly. Signed-off-by: Alexander Kuleshov Acked-by: Nicolas Dichtel Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/fs/proc/generic.c b/fs/proc/generic.c index 7fea13229f33..de14e46fd807 100644 --- a/fs/proc/generic.c +++ b/fs/proc/generic.c @@ -122,7 +122,7 @@ static int proc_getattr(struct vfsmount *mnt, struct dentry *dentry, struct kstat *stat) { struct inode *inode = dentry->d_inode; - struct proc_dir_entry *de = PROC_I(inode)->pde; + struct proc_dir_entry *de = PDE(inode); if (de && de->nlink) set_nlink(inode, de->nlink); diff --git a/fs/proc/inode.c b/fs/proc/inode.c index 8420a2f80811..13a50a32652d 100644 --- a/fs/proc/inode.c +++ b/fs/proc/inode.c @@ -40,7 +40,7 @@ static void proc_evict_inode(struct inode *inode) put_pid(PROC_I(inode)->pid); /* Let go of any associated proc directory entry */ - de = PROC_I(inode)->pde; + de = PDE(inode); if (de) pde_put(de); head = PROC_I(inode)->sysctl;