Comment 4 for bug 1409190

Revision history for this message
kary (kari-kivioja) wrote : Re: nvidia-331-updates 331.113-0ubuntu0.0.4: nvidia-331-updates kernel module failed to build [error: ‘struct file’ has no member named ‘f_dentry’]

ROOT CAUSE: In kernel headers, a feature that nvidia code depends on, has been removed in kernel 3.19:

    $ diff linux-headers-3.18.0-13/include/linux/fs.h linux-headers-3.19.0-7/include/linux/fs.h | grep f_dentry
    < #define f_dentry f_path.dentry

WORKAROUND: Make nvidia code live without that feature:

    $ sudo sed -i~ s/f_dentry/f_path.dentry/ /usr/src/nvidia-304-304.125/nv.c
    $ apt list --installed 'linux*' | cut -d / -f 1 | grep 3.19 | xargs sudo apt install --reinstall