From: Tomohiro Kusumi Date: Mon, 8 Apr 2019 21:59:24 +0000 (+0900) Subject: Unbreak build on Linux kernel < 3.10 X-Git-Tag: zfs-0.8.0-rc4~28 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=9a65234c8bbfe4e394d32172439ae0266ac59c8d;p=zfs Unbreak build on Linux kernel < 3.10 d12614521a("Fixes for procfs files backed by linked lists") uses PDE_DATA(), but since PDE_DATA() (public interface which replaced old public interface PDE()) first appeared in upstream kernel 3.10, it lacks visible local definition for kernel < 3.10. Move the local PDE_DATA() definition to a ZoL header, to unbreak build on kernel < 3.10. -- module/spl/spl-procfs-list.c: In function 'procfs_list_open': module/spl/spl-procfs-list.c:166: error: implicit declaration of function 'PDE_DATA' module/spl/spl-procfs-list.c:166: warning: assignment makes pointer from integer without a cast Reviewed-by: Brian Behlendorf Reviewed-by: John Gallagher Signed-off-by: Tomohiro Kusumi Closes #8599 --- diff --git a/include/spl/sys/proc.h b/include/spl/sys/proc.h index 287683920..05c44bca5 100644 --- a/include/spl/sys/proc.h +++ b/include/spl/sys/proc.h @@ -27,6 +27,10 @@ #include +#ifndef HAVE_PDE_DATA +#define PDE_DATA(x) (PDE(x)->data) +#endif + extern struct proc_dir_entry *proc_spl_kstat; int spl_proc_init(void); diff --git a/module/spl/spl-kstat.c b/module/spl/spl-kstat.c index feff31e6c..1f67bf157 100644 --- a/module/spl/spl-kstat.c +++ b/module/spl/spl-kstat.c @@ -30,10 +30,6 @@ #include #include -#ifndef HAVE_PDE_DATA -#define PDE_DATA(x) (PDE(x)->data) -#endif - static kmutex_t kstat_module_lock; static struct list_head kstat_module_list; static kid_t kstat_id;