Skip to content

Commit

Permalink
fs: proc: use PDE() to get proc_dir_entry
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
0xAX authored and torvalds committed Feb 13, 2015
1 parent 695f055 commit 6bee55f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion fs/proc/generic.c
Expand Up @@ -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);

Expand Down
2 changes: 1 addition & 1 deletion fs/proc/inode.c
Expand Up @@ -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;
Expand Down

0 comments on commit 6bee55f

Please sign in to comment.