Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error compiling on CentOS 7, kernel 3.10.0 #134

Open
Dimensional opened this issue May 6, 2018 · 1 comment
Open

Error compiling on CentOS 7, kernel 3.10.0 #134

Dimensional opened this issue May 6, 2018 · 1 comment

Comments

@Dimensional
Copy link

I'm unable to compile the source on the system, with it's kernel being 3.10.0. The error appears to be due to exfat_super.c's calling of truncate_pagecache with 3 arguments, while the kernel source file mm.h only has the function with 2 arguments.

/<Path_to_source>/exfat-nofuse/exfat_super.c: In function ‘exfat_write_failed’:
/<Path_to_source>/exfat-nofuse/exfat_super.c:1653:3: error: too many arguments to function ‘truncate_pagecache’
truncate_pagecache(inode, to, i_size_read(inode));
^
In file included from include/linux/pagemap.h:7:0,
from /<Path_to_source>/exfat-nofuse/exfat_super.c:57:
include/linux/mm.h:1236:13: note: declared here
extern void truncate_pagecache(struct inode *inode, loff_t new);
^
make[2]: *** [/<Path_to_source>/exfat-nofuse/exfat_super.o] Error 1
make[1]: *** [module/<Path_to_source>/exfat-nofuse] Error 2

@haklein
Copy link

haklein commented Sep 24, 2018

quick and dirty fix for CentOS/RHEL 7:

--- a/exfat_super.c
+++ b/exfat_super.c
@@ -1647,7 +1647,7 @@ static void exfat_write_failed(struct address_space *mapping, loff_t to)
 {
        struct inode *inode = mapping->host;
        if (to > i_size_read(inode)) {
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,12,0)
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,10,0)
                truncate_pagecache(inode, i_size_read(inode));
 #else
                truncate_pagecache(inode, to, i_size_read(inode));

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants