From: James Simmons Date: Mon, 3 Mar 2014 23:13:24 +0000 (-0500) Subject: LU-3319 lprocfs: update nodemap lproc to newer kernel X-Git-Tag: 2.5.58~45 X-Git-Url: https://git.whamcloud.com/?p=fs%2Flustre-release.git;a=commitdiff_plain;h=a77dd45edb772259813bcb44ba7bf7a2bf4a35ed LU-3319 lprocfs: update nodemap lproc to newer kernel 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 Reviewed-on: http://review.whamcloud.com/9465 Reviewed-by: Bob Glossman Tested-by: Jenkins Reviewed-by: Peng Tao Tested-by: Maloo Reviewed-by: Oleg Drokin --- diff --git a/lustre/nodemap/nodemap_lproc.c b/lustre/nodemap/nodemap_lproc.c index 2f5efa1..5eecd68 100644 --- a/lustre/nodemap/nodemap_lproc.c +++ b/lustre/nodemap/nodemap_lproc.c @@ -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); }