Skip to contentSkip to conversation

fs: proc: use the PDE to to get proc_dir_entry

PATCH In review Alexander Kuleshov 2 participants 2 messages Dec 27, 2014 – Jan 6, 2015 Proc filesystem

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 fs: proc: use the PDE to to get proc_dir_entry

Use the PDE to get proc_dir_entry instead of coding it directly.

---
 fs/proc/generic.c | 2 +-
 fs/proc/inode.c   | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
fs/proc/generic.c +1 -1
index 7fea132..de14e46 100644
@@ -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);
 
fs/proc/inode.c +1 -1
index 8420a2f..13a50a3 100644
@@ -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;
Signature · 1 line
2.2.1.202.g98acd41.dirty