]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/commitdiff
fs: proc: use PDE() to get proc_dir_entry
authorAlexander Kuleshov <kuleshovmail@gmail.com>
Thu, 12 Feb 2015 23:01:03 +0000 (15:01 -0800)
committerLinus Torvalds <torvalds@linux-foundation.org>
Fri, 13 Feb 2015 02:54:12 +0000 (18:54 -0800)
Use the PDE() helper to get proc_dir_entry instead of coding it directly.

Signed-off-by: Alexander Kuleshov <kuleshovmail@gmail.com>
Acked-by: Nicolas Dichtel <nicolas.dichtel@6wind.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
fs/proc/generic.c
fs/proc/inode.c

index 7fea13229f3370b7a926feebc3547cd7c2c9184b..de14e46fd80794132e31b51767f130c40f256136 100644 (file)
@@ -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);
 
index 8420a2f80811821c046b7ce069416dd291ea6349..13a50a32652dc868ab94084a1e07fb4a809e43da 100644 (file)
@@ -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;