Unable to build with an old kernel branch. Seems to take the most recent one each time

I'm under Mint. I want to build ufs kernel module for the kernel "4.15.0-54-generic" (to add write support). Here my version :

~$ uname -a
> Linux user-virtual-machine 4.15.0-54-generic #58-Ubuntu SMP Mon Jun 24 10:55:24 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux

I can't make my module with the current running kernel version.

I tried different things without results :

sudo apt source linux-image-$(uname -r)
cd /usr/src/linux-headers-4.15.0-54-generic
~$ make kernelversion
> 4.15.18

I tried with git repo with the exact same results:

~$ git clone --depth 1 --branch Ubuntu-4.15.0-54.58 git://git.launchpad.net/~ubuntu-kernel/ubuntu/+source/linux/+git/bionic
~$ cd bionic
~$ make kernelversion
> 4.15.18

I built the kernel module ufs (by compiling with make modules) and it gives me this :

$ modinfo ufs.ko
filename:       /home/user/my_dir/ufs.ko
license:        GPL
alias:          fs-ufs
srcversion:     42FF006F08C1903C2AA3E49
depends:        
retpoline:      Y
intree:         Y
name:           ufs
vermagic:       4.15.18 SMP mod_unload

So the command fails:

ufs: version magic '4.15.18 SMP mod_unload ' should be '4.15.0-54-generic SMP mod_unload '

Can you please tell me what did I do wrong ? Thanks.

How many English words
do you know?
Test your English vocabulary size, and measure
how many words do you know
Online Test
Powered by Examplum