]> git.proxmox.com Git - mirror_spl.git/commit
Linux 4.11 compat: remove stub for __put_task_struct
authorOlaf Faaland <faaland1@llnl.gov>
Mon, 13 Mar 2017 17:37:10 +0000 (10:37 -0700)
committerBrian Behlendorf <behlendorf1@llnl.gov>
Tue, 21 Mar 2017 00:43:45 +0000 (17:43 -0700)
commitbf8abea4dade111bdf3aeae30bd4bd75d49aca70
treea240d1c17e307cd821c3fe39eb8ec0db4919d500
parent9a054d54fb6772305fdbe0bb5b312cf051331726
Linux 4.11 compat: remove stub for __put_task_struct

Before kernel 2.6.29 credentials were embedded in task_structs, and zfs had
cases where one thread would need to refer to the credential of another thread,
forcing it to take a hold on the foreign thread's task_struct to ensure it was
not freed.

Since 2.6.29, the credential has been moved out of the task_struct into a
cred_t.

In addition, the mainline kernel originally did not export __put_task_struct()
but the RHEL5 kernel did, according to zfsonlinux/spl@e811949a570.  As of
2.6.39 the mainline kernel exports it.

There is no longer zfs code that takes or releases holds on a task_struct, and
so there is no longer any reference to __put_task_struct().

This affects the linux 4.11 kernel because the prototype for
__put_task_struct() is in a new include file (linux/sched/task.h) and so the
config check failed to detect the exported symbol.

Removing the unnecessary stub and corresponding config check.  This works on
kernels since the oldest one currently supported, 2.6.32 as shipped with
Centos/RHEL.

Reviewed-by: Chunwei Chen <david.chen@osnexus.com>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Olaf Faaland <faaland1@llnl.gov>
Closes #608
config/spl-build.m4
module/spl/spl-generic.c