LINUX 5.6: use struct proc_ops for proc_create 63/14063/2
authorCheyenne Wills <cwills@sinenomine.net>
Tue, 11 Feb 2020 18:29:42 +0000 (11:29 -0700)
committerBenjamin Kaduk <kaduk@mit.edu>
Fri, 14 Feb 2020 18:41:26 +0000 (13:41 -0500)
commit1626986bd6d70c526376cf7cedfd3ebbf6d3588a
treee766f529395b34f7e95688f7deb8b7373f2baf01
parent6d6a28720f4eae4652f2628fdfcc30983916f39d
LINUX 5.6: use struct proc_ops for proc_create

The Linux commit d56c0d45f0e27f814e87a1676b6bdccccbc252e9
(proc: decouple proc from VFS with "struct proc_ops") was merged into
Linux 5.6rc1.  The commit replaces the 'file_operations' parameter for
proc_create with a new structure 'proc_ops'.

Conditionally initialize and use proc_ops structures instead of
file_operations structures for calls to proc_create.

Notes:
 * proc_ops.proc_ioctl is equivalent to file_operations.unlocked_ioctl
 * The macros HAVE_UNLOCKED_IOCTL and HAVE_COMPAT_IOCTL are both
   hardcoded to 1 in linux's fs.h
 * proc_ops.compat_ioctl is conditional on Linux's CONFIG_COMPAT macro
   which is a separate test from the HAVE_COMPAT_IOCTL macro

Change-Id: I8570ca499696b4c31b381543107453fbfe355376
Reviewed-on: https://gerrit.openafs.org/14063
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
Reviewed-by: Mark Vitale <mvitale@sinenomine.net>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
src/afs/LINUX/osi_compat.h
src/afs/LINUX/osi_ioctl.c
src/afs/LINUX/osi_proc.c
src/cf/linux-kernel-struct.m4
src/cf/linux-kernel-type.m4