Whamcloud - gitweb
LU-3319 lprocfs: update nodemap lproc to newer kernel
[fs/lustre-release.git] / lustre / nodemap / nodemap_lproc.c
index 2f5efa1..5eecd68 100644 (file)
@@ -69,11 +69,7 @@ static int nodemap_idmap_show(struct seq_file *m, void *data)
 
 static int nodemap_idmap_open(struct inode *inode, struct file *file)
 {
-       struct proc_dir_entry   *dir;
-       struct lu_nodemap       *nodemap;
-
-       dir = PDE(inode);
-       nodemap = dir->data;
+       struct lu_nodemap *nodemap = PDE_DATA(inode);
 
        return single_open(file, nodemap_idmap_show, nodemap);
 }
@@ -104,11 +100,7 @@ static int nodemap_ranges_show(struct seq_file *m, void *data)
 
 static int nodemap_ranges_open(struct inode *inode, struct file *file)
 {
-       struct proc_dir_entry   *dir;
-       struct lu_nodemap       *nodemap;
-
-       dir = PDE(inode);
-       nodemap = dir->data;
+       struct lu_nodemap *nodemap = PDE_DATA(inode);
 
        return single_open(file, nodemap_ranges_show, nodemap);
 }