openzfs / spl

A shim layer which adds the core interfaces required for OpenZFS.
https://zfsonlinux.org/
GNU General Public License v2.0
281 stars 180 forks source link

Linux 5.1 compat: Fix get_ds() #716

Closed gamanakis closed 4 years ago

gamanakis commented 5 years ago

get_ds() is no longer provided in the 5.1 kernel. Define get_ds() in that case.

Signed-off-by: George Amanakis gamanakis@gmail.com

tonyhutter commented 5 years ago

Thanks for this!

Note that we typically detect the presence of deprecated kernel functions via autotools scripts rather than doing the explicit kernel version checks. See https://github.com/zfsonlinux/zfs/commit/bbb1b6cea75ff8ff27742ce778664ddeec371a01 for an example. You'll also want to base your code off the master branch rather than spl-0.7-release.

gamanakis commented 5 years ago

Actually this can be resolved much more easily, see: https://github.com/zfsonlinux/zfs/commit/b46fd243d57d0af4b4b568d8c0c4b30b79059ecc