toby63 / shiftfs-dkms

shiftfs kernel module via dkms
GNU General Public License v2.0
38 stars 10 forks source link

DKMS error on kernel versions 5.11+ #6

Closed toby63 closed 3 years ago

toby63 commented 3 years ago

Update: Fixed, see: branch k5.11. Also fixed in AUR for Arch Linux (with version 20210301-1).

Thanks to @brauner.


Description of the Bug/Problem: On kernel update, dkms shows an error:

DKMS make.log for shiftfs-dkms-20200804 for kernel 5.11.2-arch1-1 (x86_64)
So 28. Feb 17:25:33 CET 2021
make: Verzeichnis „/usr/lib/modules/5.11.2-arch1-1/build“ wird betreten
  CC [M]  /var/lib/dkms/shiftfs-dkms/20200804/build/shiftfs.o
/var/lib/dkms/shiftfs-dkms/20200804/build/shiftfs.c: In Funktion »shiftfs_btrfs_ioctl_fd_restore«:
/var/lib/dkms/shiftfs-dkms/20200804/build/shiftfs.c:1423:2: Fehler: Implizite Deklaration der Funktion »__close_fd«; meinten Sie »close_fd«? [-Werror=implicit-function-declaration]
 1423 |  __close_fd(current->files, fd);
      |  ^~~~~~~~~~
      |  close_fd
cc1: Einige Warnungen werden als Fehler behandelt
make[1]: *** [scripts/Makefile.build:279: /var/lib/dkms/shiftfs-dkms/20200804/build/shiftfs.o] Fehler 1
make: *** [Makefile:1800: /var/lib/dkms/shiftfs-dkms/20200804/build] Fehler 2
make: Verzeichnis „/usr/lib/modules/5.11.2-arch1-1/build“ wird verlassen

Expected behavior: Kernel module should build.

System information:

Workaround: I suspect this error to occur on the whole 5.11 branch (though I haven't tested that yet), so users should probably stay on the 5.10 branch for now. On Arch linux for example, the linux-lts package provides the 5.10 branch.

toby63 commented 3 years ago

@brauner If you could take a look :slightly_smiling_face:.

brauner commented 3 years ago

__close_fd() has been removed it seems so the

__close_fd(current->files, fd);

needs to be replaced by

close_fd(fd);
toby63 commented 3 years ago

Fixed in https://github.com/toby63/shiftfs-dkms/tree/k5.11.