mirror_zfs/include/linux
Brian Behlendorf 51a727e90f Set cwd to '/' for the process executing insmod.
Ricardo has pointed out that under Solaris the cwd is set to '/'
during module load, while under Linux it is set to the callers cwd.
To handle this cleanly I've reworked the module *_init()/_exit()
macros so they call a *_setup()/_cleanup() function when any SPL
dependent module is loaded or unloaded.  This gives us a chance to
perform any needed modification of the process, in this case changing
the cwd.  It also handily provides a way to avoid creating wrapper
init()/exit() functions because the Solaris and Linux prototypes
differ slightly.  All dependent modules should now call the spl
helper macros spl_module_{init,exit}() instead of the native linux
versions.

Unfortunately, it appears that under Linux there has been no consistent
API in the kernel to set the cwd in a module.  Because of this I have
had to add more autoconf magic than I'd like.  However, what I have
done is correct and has been tested on RHEL5, SLES11, FC11, and CHAOS
kernels.

In addition, I have change the rootdir type from a 'void *' to the
correct 'vnode_t *' type.  And I've set rootdir to a non-NULL value.
2009-10-01 16:06:15 -07:00
..
bitops_compat.h More 2.6.26 compat changes 2008-08-11 17:56:40 +00:00
file_compat.h More 2.6.26 compat changes 2008-08-11 17:56:40 +00:00
kallsyms_compat.h SLES10 Fixes (part 2): 2009-05-20 10:08:37 -07:00
list_compat.h Pull in timespec, list, and type compat changes to support 2008-08-11 17:20:11 +00:00
Makefile.in Build system and packaging (RPM support) 2009-03-09 15:56:55 -07:00
module_compat.h Set cwd to '/' for the process executing insmod. 2009-10-01 16:06:15 -07:00
mutex_compat.h SLES10 Fixes (part 3): 2009-05-20 11:00:39 -07:00
smp_compat.h 2.6.27+ portability changes 2009-02-02 15:12:30 -08:00
time_compat.h Pull in timespec, list, and type compat changes to support 2008-08-11 17:20:11 +00:00
uaccess_compat.h Include linux/uaccess.h compat changes. 2008-08-11 19:10:14 +00:00
workqueue_compat.h 2.6.27+ portability changes 2009-02-02 15:12:30 -08:00