Whamcloud - gitweb
LU-3319 lprocfs: update nodemap lproc to newer kernel 65/9465/2
authorJames Simmons <uja.ornl@gmail.com>
Mon, 3 Mar 2014 23:13:24 +0000 (18:13 -0500)
committerOleg Drokin <oleg.drokin@intel.com>
Fri, 28 Mar 2014 04:57:34 +0000 (04:57 +0000)
The PDE macro no longer exist in newer kernels. This
patch moves the PDE usage in the nodemap layer to use
PDE_DATA which is support across all kernels.

Change-Id: Idcfb918e0d4e203ff0f9c6d838a68b1a204ee3bd
Signed-off-by: James Simmons <uja.ornl@gmail.com>
Reviewed-on: http://review.whamcloud.com/9465
Reviewed-by: Bob Glossman <bob.glossman@intel.com>
Tested-by: Jenkins
Reviewed-by: Peng Tao <bergwolf@gmail.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
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);
 }